malloc garbage collection

Tim timcussins at eml.cc
Mon Feb 18 11:22:06 UTC 2008


Hi Leon,

Leon Pollak wrote:
> please, can somebody point me where can I find some words about memory garbage 
> collection in RTEMS - how is it done (if at all) and when?
>

To the best of my knowledge, there is no "garbage collection system" in 
rtems, not like java/mono et al. AFAIK, heap memory management is taken 
care of by the programmer using malloc/free and new/delete.

The only thing close to garbage collection that I'm aware of is calling 
free() in an ISR - these free's are not processed immediately. Instead 
they are added to a list (chain), which is processed the next time 
malloc() is called.

Have a look in cpukit/libcsupport/src/malloc.c (I'm using rtems-4-8-branch)

Tim




More information about the users mailing list