[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
release and debug mode heap allocation
- Date: Tue, 27 May 2008 13:03:25 +0200
- From: aconchillo at ieec.cat (Aleix Conchillo Flaqué)
- Subject: release and debug mode heap allocation
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