forked from Imagelibrary/rtems
2008-03-19 Till Straumann <strauman@slac.stanford.edu>
* shared/startup/pretaskinghook.c: install pointer to rtems_malloc_sbrk_helpers_table. This (and derived) BSPs rely on sbrk delivering even the first/initial chunk of memory.
This commit is contained in:
@@ -26,6 +26,8 @@
|
|||||||
#include <rtems/bspIo.h>
|
#include <rtems/bspIo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <rtems/malloc.h>
|
||||||
|
|
||||||
void bsp_libc_init( void *, uint32_t, int );
|
void bsp_libc_init( void *, uint32_t, int );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -60,6 +62,12 @@ void bsp_pretasking_hook(void)
|
|||||||
BSP_heap_start, heap_size, heap_sbrk_spared);
|
BSP_heap_start, heap_size, heap_sbrk_spared);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Must install sbrk helpers since we rely on sbrk for giving
|
||||||
|
* us even the first chunk of memory (bsp_libc_init(heap start==NULL))
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_malloc_sbrk_helpers = &rtems_malloc_sbrk_helpers_table;
|
||||||
|
|
||||||
bsp_libc_init((void *) 0, heap_size, heap_sbrk_spared);
|
bsp_libc_init((void *) 0, heap_size, heap_sbrk_spared);
|
||||||
|
|
||||||
/* Note that VME support may be omitted also by
|
/* Note that VME support may be omitted also by
|
||||||
|
|||||||
Reference in New Issue
Block a user