Changeset d041e59 in rtems


Ignore:
Timestamp:
Jan 8, 2009, 3:01:52 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
0c5b59de
Parents:
d326411
Message:

2009-01-08 Joel Sherrill <joel.sherrill@…>

  • score/src/objectextendinformation.c: Fold two paths into one.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rd326411 rd041e59  
     12009-01-08      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * score/src/objectextendinformation.c: Fold two paths into one.
     4
    152009-01-06      Ralf Corsépius <ralf.corsepius@rtems.org>
    26
  • cpukit/score/src/objectextendinformation.c

    rd326411 rd041e59  
    8888    uint32_t          maximum;
    8989    void             *old_tables;
     90    size_t            block_size;
    9091
    9192    /*
     
    126127     */
    127128
    128     if ( information->auto_extend ) {
    129       object_blocks = (void**)
    130         _Workspace_Allocate(
    131           block_count *
    132              (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
    133           ((maximum + minimum_index) * sizeof(Objects_Control *))
    134           );
    135 
    136       if ( !object_blocks )
    137         return;
    138     }
    139     else {
    140       object_blocks = (void**)
    141         _Workspace_Allocate_or_fatal_error(
    142           block_count *
    143              (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
    144           ((maximum + minimum_index) * sizeof(Objects_Control *))
    145         );
    146     }
     129    block_size = block_count *
     130           (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
     131          ((maximum + minimum_index) * sizeof(Objects_Control *));
     132    object_blocks = (void**) _Workspace_Allocate( block_size );
     133
     134    if ( !object_blocks )
     135      return;
    147136
    148137    /*
    149138     *  Break the block into the various sections.
    150      *
    151139     */
    152140
Note: See TracChangeset for help on using the changeset viewer.