release and debug mode heap allocation

Joel Sherrill joel.sherrill at OARcorp.com
Tue May 27 14:19:16 UTC 2008


Aleix Conchillo Flaqué wrote:
> On Tue, May 27, 2008 at 4:03 PM, Joel Sherrill
> <joel.sherrill at oarcorp.com> wrote:
>   
>> You have to reserve memory for message buffers.  This could
>> easily be consuming the missing workspace.
>>     
>
> Do you mean space for the messages being send with the message queues?
>
> In the documentation of "rtems_message_queue_create" it says:
>
> "...Memory is allocated from the RTEMS Workspace for the specified
> count of messages, each of max_message_size bytes in length..."
>
> This will probably be the problem. Thanks again! But how do I reserve
> this extra memory? I can not see anything in confdefs.h.
>   
Unfortunately in 4.6, the macro isn't clearly named.
You have to use CONFIGURE_MEMORY_OVERHEAD which
has one added to it and then multiplied by 1024 in
4.6.  So there is 1 kilobyte of overhead in 4.6. :(

In 4.8 and newew, 1 is not added to it so there isn't the 1 kb
overhead.  And 4.8 and newer have the much more appropriately
named CONFIGURE_MESSAGE_BUFFER_MEMORY which is in bytes.

This just points out how we have worked to be more accurate
and frugal and at the same time make things clearer. 

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        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