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

About workspace size



WuHao wrote:
> Hi:
> The macro "CONFIGURE_EXECUTIVE_RAM_SIZE" seems not include the work
> space for *MESSAGE QUEUE BUFFER* and *Thread Ready Chain.
>
>   
This isn't nearly as properly derived as it should be but it accounts 
for the
memory for ready chains.

#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \
  ( CONFIGURE_MEMORY_FOR_TASKS(1) +    /* IDLE */ \
    (256 * 12) +                       /* Ready chains */ \
    256        +                       /* name/ptr table overhead */ \
    CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \
    CONFIGURE_API_MUTEX_MEMORY         /* allocation mutex */ \
  )


> *In function "/_CORE_message_queue_Initialize/",the function
> "/_Workspace_Allocate/" is called with specified
> maximum_pending_messages and maximum_message_size.
> Also in function "/_Thread_Handler_initialization/",space for
> /_Thread_Ready_chain/ is allocated according to the macro /PRIORITY_MAXIMUM.
> /But the configuration does not inculde these two parts.
> What's your opinion?
>   
In 4.7 and older the user had to add memory for message buffers using
CONFIGURE_MEMORY_OVERHEAD. 

I recently added CONFIGURE_MESSAGE_BUFFER_MEMORY to
more explicitly account for message buffer memory.

The ready chains require 3K of memory from the workspace.  If this
wasn't accounted for, nothing would run. :)

--joel
> Thanks.
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>