Changeset 7ca3b28 in rtems


Ignore:
Timestamp:
Feb 8, 2021, 6:27:34 AM (12 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
c9ceff9
Parents:
822cad89
git-author:
Chris Johns <chrisj@…> (02/08/21 06:27:34)
git-committer:
Chris Johns <chrisj@…> (02/08/21 06:45:52)
Message:

libcsupport: Have greedy allocations use consume extended memory

  • Call the heap extend handler until all memory has been requested.

Closes #3982

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/rtems_heap_greedy.c

    r822cad89 r7ca3b28  
    3131)
    3232{
     33  Heap_Control *heap = RTEMS_Malloc_Heap;
     34  size_t size = 128 * 1024 * 1024;
    3335  void *opaque;
     36
     37  while ( size > 0 ) {
     38    opaque = (*rtems_malloc_extend_handler)( heap, size );
     39    if ( opaque == NULL ) {
     40      size >>= 1;
     41    } else {
     42      if ( rtems_malloc_dirty_helper != NULL ) {
     43        (*rtems_malloc_dirty_helper)( opaque, size );
     44      }
     45    }
     46  }
    3447
    3548  _RTEMS_Lock_allocator();
Note: See TracChangeset for help on using the changeset viewer.