diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-22 19:14:51 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-14 07:03:29 +0100 |
commit | 21275b58a5a69c3c838082ffc8a7a3641f32ea9a (patch) | |
tree | d331e17c15d71f107d0f14581a93ddf768b05813 /cpukit/score/src/objectshrinkinformation.c | |
parent | rtems: Use object information to get config max (diff) | |
download | rtems-21275b58a5a69c3c838082ffc8a7a3641f32ea9a.tar.bz2 |
score: Static Objects_Information initialization
Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. Provide default object
informations with zero objects via librtemscpu.a. This greatly
simplifies the workspace size estimate. RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.
Close #3621.
Diffstat (limited to 'cpukit/score/src/objectshrinkinformation.c')
-rw-r--r-- | cpukit/score/src/objectshrinkinformation.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/score/src/objectshrinkinformation.c b/cpukit/score/src/objectshrinkinformation.c index 5a53be9979..964f3f5ef6 100644 --- a/cpukit/score/src/objectshrinkinformation.c +++ b/cpukit/score/src/objectshrinkinformation.c @@ -33,6 +33,7 @@ void _Objects_Shrink_information( Objects_Maximum index_base; _Assert( _Objects_Allocator_is_owner() ); + _Assert( _Objects_Is_auto_extend( information ) ); /* * Search the list to find block or chunk with all objects inactive. @@ -40,9 +41,9 @@ void _Objects_Shrink_information( objects_per_block = information->objects_per_block; block_count = _Objects_Get_maximum_index( information ) / objects_per_block; - index_base = 0; + index_base = objects_per_block; - for ( block = 0; block < block_count; block++ ) { + for ( block = 1; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == objects_per_block ) { Chain_Node *node; const Chain_Node *tail; |