浏览代码

move __malloc_replaced to a top-level malloc file

it's not part of the malloc implementation but glue with musl dynamic
linker.
Rich Felker 4 年之前
父节点
当前提交
501a92660c
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 0 2
      src/malloc/oldmalloc/malloc.c
  2. 3 0
      src/malloc/replaced.c

+ 0 - 2
src/malloc/oldmalloc/malloc.c

@@ -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)

+ 3 - 0
src/malloc/replaced.c

@@ -0,0 +1,3 @@
+#include "dynlink.h"
+
+int __malloc_replaced;