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:
Till Straumann
2008-03-20 19:10:03 +00:00
parent d56c6783e5
commit 73c7cf1e10

View File

@@ -26,6 +26,8 @@
#include <rtems/bspIo.h>
#endif
#include <rtems/malloc.h>
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);
#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);
/* Note that VME support may be omitted also by