Преглед на файлове

move oldmalloc to its own directory under src/malloc

this sets the stage for replacement, and makes it practical to keep
oldmalloc around as a build option for a while if that ends up being
useful.

only the files which are actually part of the implementation are
moved. memalign and posix_memalign are entirely generic. in theory
calloc could be pulled out too, but it's useful to have it tied to the
implementation so as to optimize out unnecessary memset when
implementation details make it possible to know the memory is already
clear.
Rich Felker преди 4 години
родител
ревизия
384c0131cc
променени са 5 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      Makefile
  2. 0 0
      src/malloc/oldmalloc/aligned_alloc.c
  3. 0 0
      src/malloc/oldmalloc/malloc.c
  4. 0 0
      src/malloc/oldmalloc/malloc_impl.h
  5. 0 0
      src/malloc/oldmalloc/malloc_usable_size.c

+ 2 - 1
Makefile

@@ -17,7 +17,8 @@ includedir = $(prefix)/include
 libdir = $(prefix)/lib
 syslibdir = /lib
 
-SRC_DIRS = $(addprefix $(srcdir)/,src/* crt ldso $(COMPAT_SRC_DIRS))
+MALLOC_DIR = oldmalloc
+SRC_DIRS = $(addprefix $(srcdir)/,src/* src/malloc/$(MALLOC_DIR) crt ldso $(COMPAT_SRC_DIRS))
 BASE_GLOBS = $(addsuffix /*.c,$(SRC_DIRS))
 ARCH_GLOBS = $(addsuffix /$(ARCH)/*.[csS],$(SRC_DIRS))
 BASE_SRCS = $(sort $(wildcard $(BASE_GLOBS)))

+ 0 - 0
src/malloc/aligned_alloc.c → src/malloc/oldmalloc/aligned_alloc.c


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


+ 0 - 0
src/malloc/malloc_impl.h → src/malloc/oldmalloc/malloc_impl.h


+ 0 - 0
src/malloc/malloc_usable_size.c → src/malloc/oldmalloc/malloc_usable_size.c