Changeset d61c315 in rtems


Ignore:
Timestamp:
Apr 7, 2014, 2:00:00 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
eeb45b5
Parents:
fef4293
git-author:
Sebastian Huber <sebastian.huber@…> (04/07/14 14:00:00)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/07/14 14:48:02)
Message:

score: Fix for empty heap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/heapgreedy.c

    rfef4293 rd61c315  
    8484
    8585  _Heap_Get_free_information( heap, &info );
    86   *allocatable_size = info.largest - HEAP_BLOCK_HEADER_SIZE + HEAP_ALLOC_BONUS;
     86
     87  if ( info.largest > 0 ) {
     88    *allocatable_size = info.largest - HEAP_BLOCK_HEADER_SIZE + HEAP_ALLOC_BONUS;
     89  } else {
     90    *allocatable_size = 0;
     91  }
    8792
    8893  return _Heap_Greedy_allocate( heap, allocatable_size, 1 );
Note: See TracChangeset for help on using the changeset viewer.