Changeset 59d1127 in rtems


Ignore:
Timestamp:
Nov 10, 1999, 10:14:26 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
713b2ea
Parents:
7d29dc7f
Message:

Corrected to account for the way memory is divided up in
_Object_Extend_information. This change is a side-effect of the
change made to that file to fix an alignment problem.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/src/objectallocatebyindex.c

    r7d29dc7f r59d1127  
    4444{
    4545  Objects_Control *the_object;
    46   void            *p;
    4746
    4847  if ( index && information->maximum >= index ) {
     48    /*
     49     *  If the object is already in the local table, then
     50     *  it has already been allocated/created by a previous
     51     *  create call.
     52     */
     53
    4954    the_object = _Objects_Get_local_object( information, index );
    5055    if ( the_object )
     
    5358    /* XXX
    5459     *  This whole section of code needs to be addressed.
    55      *    +  The 0 should be dealt with more properly so we can autoextend.
    56      *    +  The pointer arithmetic is probably too expensive.
     60     *    +  The use of the index 0 for object_blocks should be dealt
     61     *       with more properly so we can autoextend.
    5762     *    +  etc.
    5863     */
    5964   
    60     p = _Addresses_Add_offset( information->object_blocks[ 0 ],
    61         (information->allocation_size * information->name_length) ),
     65    the_object = (Objects_Control *) information->object_blocks[ 0 ];
    6266
    63     p = _Addresses_Add_offset( p, (sizeof_control * (index - 1)) );
    64     the_object = (Objects_Control *)p;
    6567    _Chain_Extract( &the_object->Node );
    6668 
  • cpukit/score/src/objectallocatebyindex.c

    r7d29dc7f r59d1127  
    4444{
    4545  Objects_Control *the_object;
    46   void            *p;
    4746
    4847  if ( index && information->maximum >= index ) {
     48    /*
     49     *  If the object is already in the local table, then
     50     *  it has already been allocated/created by a previous
     51     *  create call.
     52     */
     53
    4954    the_object = _Objects_Get_local_object( information, index );
    5055    if ( the_object )
     
    5358    /* XXX
    5459     *  This whole section of code needs to be addressed.
    55      *    +  The 0 should be dealt with more properly so we can autoextend.
    56      *    +  The pointer arithmetic is probably too expensive.
     60     *    +  The use of the index 0 for object_blocks should be dealt
     61     *       with more properly so we can autoextend.
    5762     *    +  etc.
    5863     */
    5964   
    60     p = _Addresses_Add_offset( information->object_blocks[ 0 ],
    61         (information->allocation_size * information->name_length) ),
     65    the_object = (Objects_Control *) information->object_blocks[ 0 ];
    6266
    63     p = _Addresses_Add_offset( p, (sizeof_control * (index - 1)) );
    64     the_object = (Objects_Control *)p;
    6567    _Chain_Extract( &the_object->Node );
    6668 
Note: See TracChangeset for help on using the changeset viewer.