Non-contiguous heap area?

Joel Sherrill joel.sherrill at
Wed Feb 20 20:37:54 UTC 2002

"Smith, Gene" wrote:
> Is it possible to configure rtems with a heap area consisting of 2 (or more)
> non-contiguous memory ranges?  Currently my heap is contiguous, but I
> discovered a good-sized chunk of unused but not adjoining memory that could
> be added to the heap if this is possible. All memory allocation currently
> done with malloc (no region manager stuff running).

The region manager does support some combinations of non-contiguous
It would require a new malloc family routine to "extend the malloc heap"
using rtems_region_extend().  There are 5 possibilities for the location
of the memory you are adding to the heap: in it (error), before and 
after contiguous, and before and after non-contiguous.  The code in 
score/src/heapextend.c does not support all of the possibilities yet
but all you would have to do is fix the case you care about that
returns not implemented.  

If you want OAR to implement this for you, email sales and we
can get you an estimate.  

> -gene

Joel Sherrill, Ph.D.             Director of Research & Development
joel at                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the users mailing list