libc: regoranize malloc build
Create a stdlib/malloc to hold the definition of the malloc interface (e.g., the Symbol.map file) and make jemalloc a subdirectory. This will make it easier to integrate alternative allocators such as snmalloc while making it clear that the current jemalloc symbols are the FreeBSD API/ABI (for better or worse). Suggested by: jrtc27 Reviewed by: jrtc27, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41457
This commit is contained in:
@@ -28,7 +28,7 @@ C99_Exit.c: ${LIBC_SRCTOP}/stdlib/_Exit.c .NOMETA
|
||||
|
||||
SYM_MAPS+= ${LIBC_SRCTOP}/stdlib/Symbol.map
|
||||
|
||||
.include "${LIBC_SRCTOP}/stdlib/jemalloc/Makefile.inc"
|
||||
.include "${LIBC_SRCTOP}/stdlib/malloc/Makefile.inc"
|
||||
|
||||
# machine-dependent stdlib sources
|
||||
.sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib/Makefile.inc"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
SYM_MAPS+=${LIBC_SRCTOP}/stdlib/malloc/Symbol.map
|
||||
|
||||
.include "${LIBC_SRCTOP}/stdlib/malloc/jemalloc/Makefile.inc"
|
||||
@@ -4,8 +4,6 @@ JEMALLOCSRCS:= jemalloc.c arena.c background_thread.c base.c bin.c bitmap.c \
|
||||
prng.c prof.c rtree.c safety_check.c sc.c stats.c sz.c tcache.c \
|
||||
test_hooks.c ticker.c tsd.c witness.c
|
||||
|
||||
SYM_MAPS+=${LIBC_SRCTOP}/stdlib/jemalloc/Symbol.map
|
||||
|
||||
CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include
|
||||
|
||||
.for src in ${JEMALLOCSRCS}
|
||||
Reference in New Issue
Block a user