super clear Philippe
Thanks again for your help

----- Mail original -----
De: "Philippe Gerum" <>
À: "pierre roumagnac" <>
Envoyé: Lundi 17 Octobre 2016 09:37:43
Objet: Re: [Xenomai] [xenomai]:heap memory management

On 10/17/2016 08:44 AM, wrote:
> For my culture can someone explain me (or provide doc) the difference between 
> the memory pool create with --mem_pool_size and the 
> rt_heap_create api of alchemy?

With Xenomai 3, any application process has access to a main memory
pool, whose size can be set explicitly using --mem-pool-size, 1Mb by
default. The Xenomai libraries allocate the dynamic memory they need
from this main pool, which can be shared between multiple processes if
you built the Xenomai code stack with the --enable-pshared option set.
This allows multi-process applications to share real-time objects such
as tasks, sema4, queues, heaps and so on.

Applications using the alchemy API may call rt_heap_create() to
initialize specific memory heaps for their own usage, whose memory is
pulled from the main pool; this way, such heaps inherit the
shared/private property of the main pool memory, depending on whether
--enable-pshared was given to the configure script.

Bottom line is that --enable-pshared should be set only for applications
composed of multiple concurrent processes which must share data and/or
real-time constructs; this feature should be left disabled otherwise.

See the command line options for any Xenomai 3 application:


Xenomai mailing list

Reply via email to