[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible confdefs error when calculating workspace size

On 03/14/2011 09:17 AM, Fabr?cio de Novaes Kucinskis wrote:
> Hi all,
> I'm upgrading an application from RTEMS 4.8 to 4.10. This application 
> runs 11 tasks (including Init and Idle) and some message queues.
> When running on RTEMS 4.10, the application creates all tasks, but 
> stops after the creation of some queues, returning RTEMS_UNSATISFIED 
> from a rtems_message_queue_create directive. According to the manual, 
> this means "unable to allocate message buffers" (from the workspace).
How are you accounting for the message buffer memory?  It comes
out of the workspace.

For each message queue, you need to reserve like this:


> The problem is solved when I add one to the number of configured tasks 
> (RTEMS_MAXIMUM_TASKS 12) - this increases the workspace size as well.
> This didn't happen with previous versions - all I needed to do was 
> inform the correct number of tasks, and the workspace seemed to have 
> the right size.
> I couldn't find anything on the documentation that indicates a change 
> on the workspace size configuration.
There are almost always changes to the internals of confdefs.h from
version to version.  This time, it got tighter and did not overallocate
as much memory.  In 4.9, it was over estimating and likely covered up
that you didn't reserve memory for the message buffers.
> Is there something I'm missing, or this could be a possible error on 
> confdefs.h?
> Thanks in advance and best regards,
> Fabr?cio de Novaes Kucinskis.

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