Changeset 30c71c3 in rtems


Ignore:
Timestamp:
Jan 7, 2021, 11:05:37 AM (3 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b35ac99
Parents:
c734e86
git-author:
Sebastian Huber <sebastian.huber@…> (01/07/21 11:05:37)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/26/21 14:29:36)
Message:

heap: Fix _Heap_Area_overhead()

The first block must be a proper block. Account for this in
_Heap_Area_overhead().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/heap.h

    rc734e86 r30c71c3  
    456456  }
    457457
    458   return 2 * (page_size - 1) + HEAP_BLOCK_HEADER_SIZE;
     458  /*
     459   * Account for a potential alignment of the area begin address to a page
     460   * boundary, the first block, and the last block.  The last block consists
     461   * only of a block header.
     462   */
     463  return page_size - 1 + _Heap_Min_block_size( page_size ) +
     464    HEAP_BLOCK_HEADER_SIZE;
    459465}
    460466
Note: See TracChangeset for help on using the changeset viewer.