Issue with heap initialization.

Rohan Kangralkar rohankangralkar at yahoo.com
Sat May 5 20:57:29 UTC 2012


Hi RTEMS Developers,

We have implemented some test benches for performance measurement. We tried
to execute the test bench on arm csb336.
But to our suprise RTEMS core failed due to memory management issues.

RTEMS_Malloc_Initialize() is called from bsp_libc_init() at this stage of
booting RTEMS in a SYSTEM_STATE_BEFORE_MULTITASKING state.

#0  _Heap_Walk (heap=0x3e894, source=0, dump=true) at
../../../../../../rtems/c/src/../../cpukit/score/src/heapwalk.c:320
#1  0x00016064 in _Protected_heap_Walk (the_heap=0x3e894, source=0,
do_dump=true) at
../../../../../../rtems/c/src/../../cpukit/score/src/pheapwalk.c:47
#2  0x00006f3c in RTEMS_Malloc_Initialize (heap_begin=0xf7ff8,
heap_size=66112, sbrk_amount=0) at
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/malloc_initialize.c:126
#3  0x0000223c in bsp_libc_init (heap_begin=0xf7ff8, heap_size=66112,
sbrk_amount=0) at
../../../../../../../../rtems/c/src/lib/libbsp/arm/csb336/../../shared/bsplibc.c:20
#4  0x000018c8 in bootcard_bsp_libc_helper () at
/home/student/rkangral/workspace/RTEMS_4.11/DB_BRANCH/sce/sw/os/rtems/os_wrapper.c:229


We check the state of RTEMS before proceeding with heap walk
if ( !(_System_state_Is_up( _System_state_Get() )) {
    return true;
  }
RTEMS is still not up the core returns without checking the heap. Due to
this we cannot test the initial heap.

I think we should be able to perform the _Heap_Walk in
SYSTEM_STATE_BEFORE_MULTITASKING. What is your sugession?


Thanks in advance.


Regards
Rohan Kangralkar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120505/66b38200/attachment.html>


More information about the users mailing list