mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2010-02-01 Till Straumann <strauman@slac.stanford.edu>
PR 1492/bsps * shared/startup/sbrk.c: When BSP_sbrk_policy had the value (-1) (-> give all memory to the heap initially) then the computation of the remaining heap size was wrong.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2010-02-01 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
PR 1492/bsps
|
||||||
|
* shared/startup/sbrk.c: When BSP_sbrk_policy had the value (-1)
|
||||||
|
(-> give all memory to the heap initially) then the computation
|
||||||
|
of the remaining heap size was wrong.
|
||||||
|
|
||||||
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
PR 1385/cpukit
|
PR 1385/cpukit
|
||||||
|
|||||||
@@ -89,9 +89,10 @@ uint32_t
|
|||||||
_bsp_sbrk_init(uint32_t heap_start, uint32_t *heap_size_p)
|
_bsp_sbrk_init(uint32_t heap_start, uint32_t *heap_size_p)
|
||||||
{
|
{
|
||||||
uint32_t rval=0;
|
uint32_t rval=0;
|
||||||
|
uint32_t orig_size;
|
||||||
|
|
||||||
remaining_start = heap_start;
|
remaining_start = heap_start;
|
||||||
remaining_size = *heap_size_p;
|
orig_size = remaining_size = *heap_size_p;
|
||||||
|
|
||||||
if (remaining_start < LIMIT_32M &&
|
if (remaining_start < LIMIT_32M &&
|
||||||
remaining_start + remaining_size > LIMIT_32M) {
|
remaining_start + remaining_size > LIMIT_32M) {
|
||||||
@@ -105,7 +106,8 @@ _bsp_sbrk_init(uint32_t heap_start, uint32_t *heap_size_p)
|
|||||||
if ( 0 != &BSP_sbrk_policy ) {
|
if ( 0 != &BSP_sbrk_policy ) {
|
||||||
switch ( BSP_sbrk_policy ) {
|
switch ( BSP_sbrk_policy ) {
|
||||||
case (uint32_t)(-1):
|
case (uint32_t)(-1):
|
||||||
remaining_start = heap_start + *heap_size_p;
|
remaining_start = heap_start + orig_size;
|
||||||
|
*heap_size_p = orig_size;
|
||||||
remaining_size = 0;
|
remaining_size = 0;
|
||||||
/* return a nonzero sbrk_amount because the libsupport code
|
/* return a nonzero sbrk_amount because the libsupport code
|
||||||
* at some point divides by this number prior to trying an
|
* at some point divides by this number prior to trying an
|
||||||
|
|||||||
Reference in New Issue
Block a user