diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-05-23 22:09:28 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-05-23 22:09:28 +0000 |
commit | 7042065c29bbd42e5dd01f1b161a62bf57730d55 (patch) | |
tree | 410dfffb4768fd6cb7db53b806552084e31d67c8 /cpukit/sapi | |
parent | 2007-05-23 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-7042065c29bbd42e5dd01f1b161a62bf57730d55.tar.bz2 |
2007-05-23 Joel Sherrill <joel.sherrill@OARcorp.com>
* sapi/include/confdefs.h: Add CONFIGURE_MESSAGE_BUFFER_MEMORY so there
is less dependence on CONFIGURE_MEMORY_OVERHEAD. Do not arbitrarily
add 1 to CONFIGURE_MEMORY_OVERHEAD so we do not waste a kilobyte for
unused Workspace. Round the workspace required size to an 8 byte
boundary instead of a 0x400 byte one. We may end up needing to add 8
bytes again to account for the alignment rounding.
Diffstat (limited to 'cpukit/sapi')
-rw-r--r-- | cpukit/sapi/include/confdefs.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index b32d9a84ac..900e3af759 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -1001,14 +1001,29 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = { #endif -#ifndef CONFIGURE_MEMORY_OVERHEAD -#define CONFIGURE_MEMORY_OVERHEAD 0 -#endif - +/* + * This is so we can account for tasks with stacks greater than minimum + * size. This is in bytes. + */ #ifndef CONFIGURE_EXTRA_TASK_STACKS #define CONFIGURE_EXTRA_TASK_STACKS 0 #endif +/* + * Account for pending message buffers in bytes. + */ +#ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY +#define CONFIGURE_MESSAGE_BUFFER_MEMORY 0 +#endif + +/* + * Catch all for extra memory in case something broken and underestimates. + * Historically this was used for message buffers. + */ +#ifndef CONFIGURE_MEMORY_OVERHEAD +#define CONFIGURE_MEMORY_OVERHEAD 0 +#endif + #define CONFIGURE_API_MUTEX_MEMORY \ ( (1) * \ ( sizeof(API_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) \ @@ -1067,9 +1082,10 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = { CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \ CONFIGURE_MEMORY_FOR_MP + \ CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \ - (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \ + CONFIGURE_MESSAGE_BUFFER_MEMORY + \ + (CONFIGURE_MEMORY_OVERHEAD * 1024) + \ (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \ -) & 0xfffffc00) +) & ~0x7) #endif #ifdef CONFIGURE_GNAT_RTEMS |