memory allocation

Joel Sherrill joel.sherrill at
Mon May 6 11:24:58 UTC 2002

Jan Suchotzki wrote:
> Hi,
> I have question related to memory allocation. I've seen the partition and region manager. Where are the differences and what about malloc?

region --> variable blocks
partition --> fixed blocks

malloc is implemented as a region

> I need a big block of memory (~200-500 kB). In one case I need a contiguous block in another case I need two contiguous blocks. Which is the most efficient way to allocate such an amount of memory, and why?

I don't know how much memory you have on your board or what type of
requirements but I would tend to handle this in the linker script.  If
go with malloc you will have to handle the alignment yourself.  If you
with partition, you will have to find the memory yourself (malloc or
script) to only allocate a few blocks.

> With kind regards
> Jan Suchotzki

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