take a look at the 4-th parameter of rt_pipe_create() :

@param poolsize Specifies the size of a dedicated buffer pool for the
 * pipe. Passing 0 means that all message allocations for this pipe are
 * performed on the system heap.

The system heap is also used for other allocations and not only to serve a given heap. It's default size is 128 Kb (configurable through the config though).

Passing non-zero parameter causes a private heap of the given size to be created for this heap.

Note, it's a size in bytes, not a flag (in your example you use 1 for the second heap).

This value is rounded up to a page size.

if (poolsize < 2 * PAGE_SIZE)
                        poolsize = 2 * PAGE_SIZE;

poolsize = xnheap_rounded_size(poolsize, PAGE_SIZE);

Best regards,
Dmitry Adamushko
Xenomai-core mailing list

Reply via email to