move __malloc_replaced to a top-level malloc file
authorRich Felker <dalias@aerifal.cx>
Thu, 11 Jun 2020 00:42:54 +0000 (20:42 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 11 Jun 2020 00:42:54 +0000 (20:42 -0400)
it's not part of the malloc implementation but glue with musl dynamic
linker.

src/malloc/oldmalloc/malloc.c
src/malloc/replaced.c [new file with mode: 0644]

index afa75722b8f716c51d40eebc4079a83d46f13016..1c6b07eca2d4a31bb17b0f67dd12045075c42b3d 100644 (file)
@@ -20,8 +20,6 @@ static struct {
        volatile int split_merge_lock[2];
 } mal;
 
-int __malloc_replaced;
-
 /* Synchronization tools */
 
 static inline void lock(volatile int *lk)
diff --git a/src/malloc/replaced.c b/src/malloc/replaced.c
new file mode 100644 (file)
index 0000000..8acc249
--- /dev/null
@@ -0,0 +1,3 @@
+#include "dynlink.h"
+
+int __malloc_replaced;