release and debug mode heap allocation

Aleix Conchillo Flaqué aconchillo at ieec.cat
Tue May 27 11:03:25 UTC 2008


Hi all,

I am experiencing a strange memory allocation behavior when running my
application in release and debug modes.

I have added some prints in the _Heap_Allocate routine to see what's going on:

* release mode: number of calls: 2033 - total size allocated: 853124
* debug mode: number of calls: 2035 - total size allocated: 884732
<--- if ( the_block == _Heap_Tail( the_heap ) ) FAILS in last call!

Increasing the number of tasks (CONFIGURE_MAXIMUM_TASKS), solves the
problem in debug mode, and I get:

* debug mode: number of calls: 2041 - total size allocated: 892504

And in fact, I can not set the exact number of tasks (plus IDLE and
initialisation) to CONFIGURE_MAXIMUM_TASKS, even in release mode. So,
the release  mode suffers from the same problem when I decrease the
number of tasks. Thus, I always need to increase the number of tasks,
so there is enough heap.

Does this makes any sense?

Btw, RTEMS 4.6.6 here.

Aleix



More information about the users mailing list