Changeset fb29a8de in rtems


Ignore:
Timestamp:
Aug 1, 2009, 6:18:26 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
c9c05a0
Parents:
709ac26
Message:

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

  • score/inline/rtems/score/heap.inl, score/src/heapresizeblock.c: Simplify routine.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r709ac26 rfb29a8de  
     12009-08-01      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * score/inline/rtems/score/heap.inl, score/src/heapresizeblock.c:
     4        Simplify routine.
     5
    162009-08-01      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • cpukit/score/inline/rtems/score/heap.inl

    r709ac26 rfb29a8de  
    239239)
    240240{
     241  _H_uptr_t remainder;
    241242  _H_uptr_t v = *value;
    242   uint32_t a = alignment;
    243   _H_uptr_t r = v % a;
    244   *value = r ? v - r + a : v;
     243
     244  remainder = v % alignment;
     245
     246  if ( remainder )
     247    *value = v - remainder + alignment;
    245248}
    246249
  • cpukit/score/src/heapresizeblock.c

    r709ac26 rfb29a8de  
    118118    _Heap_Align_down(&free_block_size, page_size);
    119119
     120printk( "free=%d\n", free_block_size );
    120121    if (free_block_size > 0) {
    121122
     
    126127      uint32_t new_block_size = old_block_size - free_block_size;
    127128
     129printk( "new=%d min=%d hit=%s\n", new_block_size, min_block_size,
     130      ((new_block_size < min_block_size) ? "yes" : "no") );
    128131      if (new_block_size < min_block_size) {
    129132        uint32_t delta = min_block_size - new_block_size;
     
    142145      _HAssert(_Heap_Is_aligned(free_block_size, page_size));
    143146
     147printk( "next_is_used=%d free=%d min=%d hit=%s\n", next_is_used, free_block_size, min_block_size,
     148      ((next_is_used) && (free_block_size <= min_block_size) ? "yes" : "no") );
    144149      if (!next_is_used) {
    145150        /* Extend the next block to the low addresses by 'free_block_size' */
Note: See TracChangeset for help on using the changeset viewer.