Changeset 96f2d87 in rtems


Ignore:
Timestamp:
Mar 10, 2009, 5:40:06 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
9e3d90d
Parents:
aab8725
Message:

2009-03-10 Eric Norum <norume@…>

  • bootcard.c: Swap order of RTEMS Workspace and Malloc Heap. This allows the potential for sbrk() to extend the heap area. This actually is done on PowerPC BSPs with more than 32MB which use dynamic loading.
Location:
c/src/lib/libbsp/shared
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    raab8725 r96f2d87  
     12009-03-10      Eric Norum <norume@aps.anl.gov>
     2
     3        * bootcard.c: Swap order of RTEMS Workspace and Malloc Heap. This
     4        allows the potential for sbrk() to extend the heap area. This
     5        actually is done on PowerPC BSPs with more than 32MB which use
     6        dynamic loading.
     7
    182009-03-05      Till Straumann <strauman@slac.stanford.edu>
    29
  • c/src/lib/libbsp/shared/bootcard.c

    raab8725 r96f2d87  
    7474  if ( !rtems_unified_work_area &&
    7575       heap_start == BSP_BOOTCARD_HEAP_USES_WORK_AREA) {
    76     /* Use the work area start as heap start */
    77     heap_start = work_area_start;
     76    /* Place the heap immediately following the work area */
     77    heap_start = work_area_start + rtems_configuration_get_work_space_size();
    7878
    7979    /* Ensure proper alignement */
     
    8484
    8585    /*
    86      * For the default heap size use the free space from the start of the
    87      * work area up to the work space start as heap area.
     86     * For the default heap size use the free space from the end of the
     87     * work space up to the end of the work area as heap.
    8888     */
    89     heap_size_default = (intptr_t) ((char *) Configuration.work_space_start
    90       - (char *) heap_start);
     89    heap_size_default = work_area_size - rtems_configuration_get_work_space_size();
    9190
    9291    /* Keep it as a multiple of 16 bytes */
     
    183182    Configuration.work_space_size  = work_area_size;
    184183  } else {
    185     Configuration.work_space_start = (char *) work_area_start +
    186       work_area_size - rtems_configuration_get_work_space_size();
     184    Configuration.work_space_start = (char *) work_area_start;
    187185  }
    188186
Note: See TracChangeset for help on using the changeset viewer.