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.
This commit is contained in:
Joel Sherrill
2007-05-23 22:09:28 +00:00
parent bfa0476d84
commit 7042065c29
2 changed files with 31 additions and 6 deletions

View File

@@ -1,3 +1,12 @@
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.
2007-05-23 Joel Sherrill <joel.sherrill@OARcorp.com>
Yu Chen <chyyuu@gmail.com>

View File

@@ -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