where is the memory for CONFIGURE_INITIAL_EXTENSION_TABLE?

shizheng neversetsun at ustc.edu
Mon Apr 23 12:16:55 UTC 2007


   1.  In confdefs.h, the memory for struct rtems_extension_table(i.e.
      User_extensions_Table) is reserved:


rtems_extensions_table Configuration_Initial_Extensions[] = {
...
};

#define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions


   2. But rtems_initialize_executive_early() calls

_User_extensions_Handler_initialization(
configuration_table->number_of_initial_extensions,
configuration_table->User_extension_table
);

   3. And in userext.inl, the memory for struct User_extensions_Control
      is allocated again which the values in
      CONFIGURE_INITIAL_EXTENSION_TABLE are copied into.

RTEMS_INLINE_ROUTINE void _User_extensions_Handler_initialization (
uint32_t number_of_extensions,
User_extensions_Table *initial_extensions
)
{
...
if ( initial_extensions ) {
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
...
for ( i = 0 ; i < number_of_extensions ; i++ ) {
_User_extensions_Add_set (extension, &initial_extensions[i]);
extension++;
}
}
}

   4. But in confdefs.h, the calculation of CONFIGURE_EXECUTIVE_RAM_SIZE
      seems to miss the memories allocated in 3rd step. And
      CONFIGURE_EXECUTIVE_RAM_SIZE is the size of workspace to hold all
      rtems objects.

rtems_configuration_table Configuration = {
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
CONFIGURE_EXECUTIVE_RAM_SIZE,
...
}


jennifer at oarcorp.com wrote:
> See confdefs.h CONFIGURE_INITIAL_EXTENSION_TABLE is defined in this file
> to be Configuration_Initial_Extensions whose memory is reserved in this
> file as well.
>
> Jennifer
>
>   
>> Hi,all:
>>
>> I couldn't find the memory area reserved for
>> CONFIGURE_INITIAL_EXTENSION_TABLE
>> in CONFIGURE_EXECUTIVE_RAM_SIZE.
>>
>> Only the memory for user extensions is calculated in
>> CONFIGURE_EXECUTIVE_RAM_SIZE.
>>
>> #define CONFIGURE_EXECUTIVE_RAM_SIZE \
>> ...
>> CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
>> CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \
>> CONFIGURE_STACK_CHECKER_EXTENSION ) + \
>> ...
>>
>>
>> Did I get any wrong idea?
>>
>>
>> best wishes, shizheng
>>
>>
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.com
>> http://rtems.rtems.org/mailman/listinfo/rtems-users
>>
>>     
>
>
>
>   




More information about the users mailing list