forked from Imagelibrary/rtems
malloc: Hide RTEMS_Malloc_Sbrk_amount
Move RTEMS_Malloc_Sbrk_amount to the only implementation file which uses it and make it private to hide implementation-details from an API header.
This commit is contained in:
@@ -48,12 +48,7 @@ Heap_Control *RTEMS_Malloc_Initialize(
|
|||||||
Heap_Initialization_or_extend_handler extend
|
Heap_Initialization_or_extend_handler extend
|
||||||
);
|
);
|
||||||
|
|
||||||
extern ptrdiff_t RTEMS_Malloc_Sbrk_amount;
|
void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount );
|
||||||
|
|
||||||
static inline void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount )
|
|
||||||
{
|
|
||||||
RTEMS_Malloc_Sbrk_amount = sbrk_amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef void *(*rtems_heap_extend_handler)(
|
typedef void *(*rtems_heap_extend_handler)(
|
||||||
Heap_Control *heap,
|
Heap_Control *heap,
|
||||||
|
|||||||
@@ -29,7 +29,12 @@
|
|||||||
|
|
||||||
#include "malloc_p.h"
|
#include "malloc_p.h"
|
||||||
|
|
||||||
ptrdiff_t RTEMS_Malloc_Sbrk_amount;
|
static ptrdiff_t RTEMS_Malloc_Sbrk_amount;
|
||||||
|
|
||||||
|
void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount )
|
||||||
|
{
|
||||||
|
RTEMS_Malloc_Sbrk_amount = sbrk_amount;
|
||||||
|
}
|
||||||
|
|
||||||
void *rtems_heap_extend_via_sbrk(
|
void *rtems_heap_extend_via_sbrk(
|
||||||
Heap_Control *heap,
|
Heap_Control *heap,
|
||||||
|
|||||||
Reference in New Issue
Block a user