From 6c66bbbadf4bbcb0efc5bda992f638feadfb69e5 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 20 Apr 2021 09:58:06 +0200 Subject: 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. --- cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpukit/libcsupport') diff --git a/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c b/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c index 6bb896a81e..da7896c728 100644 --- a/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c +++ b/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c @@ -29,7 +29,12 @@ #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( Heap_Control *heap, -- cgit v1.2.3