Changeset 8814cf0 in rtems


Ignore:
Timestamp:
May 7, 2009, 5:08:28 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
56b7951
Parents:
d2ec643
Message:

2009-05-07 Santosh G Vattam <vattam.santosh@…>

  • malloctest/init.c: Add test case for heap resize block when the resize creates a free block large enough to free.
Location:
testsuites/libtests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/ChangeLog

    rd2ec643 r8814cf0  
     12009-05-07      Santosh G Vattam <vattam.santosh@gmail.com>
     2
     3        * malloctest/init.c: Add test case for heap resize block when the
     4        resize creates a free block large enough to free.
     5
    162009-04-03      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • testsuites/libtests/malloctest/init.c

    rd2ec643 r8814cf0  
    151151  _Heap_Free( &TestHeap, p3 );
    152152  _Heap_Free( &TestHeap, p4 );
     153  _Heap_Free( &TestHeap, p1 );
     154 
     155  /*
     156   *  To tackle a special case of resizing a block in order to cover the
     157   *  code in heapresizeblock.c
     158   *
     159   *  Re-initialise the heap, so that the blocks created from now on
     160   *  are contiguous.
     161   */
     162  test_heap_init();
     163  puts( "Heap Initialized" );
     164  p1 = _Heap_Allocate( &TestHeap, 500 );
     165  rtems_test_assert( p2 != NULL );
     166  p2 = _Heap_Allocate( &TestHeap, 500 );
     167  rtems_test_assert( p2 != NULL );
     168  rsc = _Heap_Resize_block( &TestHeap, p1, 256, &u1, &u2 );
     169  rtems_test_assert( rsc == HEAP_RESIZE_SUCCESSFUL );
     170  _Heap_Free( &TestHeap, p1 );
     171  _Heap_Free( &TestHeap, p2 ); 
    153172}
    154173
Note: See TracChangeset for help on using the changeset viewer.