From 4f599ed99fc0aa37bc4d100cf787880c1e1bb97a Mon Sep 17 00:00:00 2001 From: Till Straumann Date: Wed, 18 May 2011 05:26:53 +0000 Subject: 2011-05-18 Till Straumann PR1797/bsps: Applied cleaned-up version of Kate's patch. CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK is now a 'bspopts.h' setting and as such configurable. --- c/src/lib/libbsp/shared/include/bootcard.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'c/src/lib/libbsp/shared/include/bootcard.h') diff --git a/c/src/lib/libbsp/shared/include/bootcard.h b/c/src/lib/libbsp/shared/include/bootcard.h index 441eb1972f..74ad6eec61 100644 --- a/c/src/lib/libbsp/shared/include/bootcard.h +++ b/c/src/lib/libbsp/shared/include/bootcard.h @@ -88,6 +88,23 @@ void bsp_get_work_area( uintptr_t *heap_size ); +/** + * @brief Gives the BSP a chance to reduce the work area size with sbrk() adding more later. + * + * bsp_sbrk_init() may reduce the work area size passed in. The routine + * returns the 'sbrk_amount' to be used when extending the heap. + * Note that the return value may be zero. + * + */ + +#ifdef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK +uintptr_t bsp_sbrk_init( + void *work_area_begin, + uintptr_t *work_area_size_p +); +#endif + + /** * @brief Standard system initialization procedure. * -- cgit v1.2.3