about summary refs log tree commit diff
path: root/src/malloc
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-06 16:32:49 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-12 14:34:28 -0400
commit55a1c9c89028f8930e5f65fe5484fa7ba0e18853 (patch)
tree426ed3adf14fc0cac4e3748ff4ccdd65f65fe89d /src/malloc
parent18bf0829a7545b14de3fe241a65298c5f36e8bbc (diff)
downloadmusl-55a1c9c89028f8930e5f65fe5484fa7ba0e18853.tar.gz
musl-55a1c9c89028f8930e5f65fe5484fa7ba0e18853.tar.xz
musl-55a1c9c89028f8930e5f65fe5484fa7ba0e18853.zip
move declarations for malloc internals to malloc_impl.h
Diffstat (limited to 'src/malloc')
-rw-r--r--src/malloc/expand_heap.c3
-rw-r--r--src/malloc/lite_malloc.c3
-rw-r--r--src/malloc/malloc.c2
3 files changed, 2 insertions, 6 deletions
diff --git a/src/malloc/expand_heap.c b/src/malloc/expand_heap.c
index d8c0be74..e6a3d7a0 100644
--- a/src/malloc/expand_heap.c
+++ b/src/malloc/expand_heap.c
@@ -4,6 +4,7 @@
 #include <sys/mman.h>
 #include "libc.h"
 #include "syscall.h"
+#include "malloc_impl.h"
 
 /* This function returns true if the interval [old,new]
  * intersects the 'len'-sized interval below &libc.auxv
@@ -27,8 +28,6 @@ static int traverses_stack_p(uintptr_t old, uintptr_t new)
 	return 0;
 }
 
-void *__mmap(void *, size_t, int, int, int, off_t);
-
 /* Expand the heap in-place if brk can be used, or otherwise via mmap,
  * using an exponential lower bound on growth by mmap to make
  * fragmentation asymptotically irrelevant. The size argument is both
diff --git a/src/malloc/lite_malloc.c b/src/malloc/lite_malloc.c
index 96c4feac..49157d36 100644
--- a/src/malloc/lite_malloc.c
+++ b/src/malloc/lite_malloc.c
@@ -3,11 +3,10 @@
 #include <limits.h>
 #include <errno.h>
 #include "libc.h"
+#include "malloc_impl.h"
 
 #define ALIGN 16
 
-void *__expand_heap(size_t *);
-
 static void *__simple_malloc(size_t n)
 {
 	static char *cur, *end;
diff --git a/src/malloc/malloc.c b/src/malloc/malloc.c
index d72883e1..96982596 100644
--- a/src/malloc/malloc.c
+++ b/src/malloc/malloc.c
@@ -123,8 +123,6 @@ void __dump_heap(int x)
 }
 #endif
 
-void *__expand_heap(size_t *);
-
 static struct chunk *expand_heap(size_t n)
 {
 	static int heap_lock[2];