diff options
Diffstat (limited to 'cpukit/score/src/objectshrinkinformation.c')
-rw-r--r-- | cpukit/score/src/objectshrinkinformation.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/score/src/objectshrinkinformation.c b/cpukit/score/src/objectshrinkinformation.c index cf3618f8fa..3b1841a16b 100644 --- a/cpukit/score/src/objectshrinkinformation.c +++ b/cpukit/score/src/objectshrinkinformation.c @@ -28,9 +28,9 @@ void _Objects_Shrink_information( ) { Objects_Maximum objects_per_block; - Objects_Maximum index_base; Objects_Maximum block_count; Objects_Maximum block; + Objects_Maximum index_base; _Assert( _Objects_Allocator_is_owner() ); @@ -39,14 +39,14 @@ void _Objects_Shrink_information( */ objects_per_block = information->objects_per_block; - index_base = _Objects_Get_index( information->minimum_id ); - block_count = ( information->maximum - index_base ) / objects_per_block; + block_count = information->maximum / objects_per_block; + index_base = 0; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == objects_per_block ) { Chain_Node *node; const Chain_Node *tail; - uint32_t index_end; + Objects_Maximum index_end; node = _Chain_First( &information->Inactive ); tail = _Chain_Immutable_tail( &information->Inactive ); @@ -57,7 +57,7 @@ void _Objects_Shrink_information( uint32_t index; object = (Objects_Control *) node; - index = _Objects_Get_index( object->id ); + index = _Objects_Get_index( object->id ) - OBJECTS_INDEX_MINIMUM; /* * Get the next node before the node is extracted |