git: c5f49ece16a9 - main - libc: regoranize malloc build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Aug 2023 18:20:13 UTC
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=c5f49ece16a92380092191fad13cb1da72af5d37 commit c5f49ece16a92380092191fad13cb1da72af5d37 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2023-08-16 18:16:51 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2023-08-16 18:16:51 +0000 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 --- lib/libc/stdlib/Makefile.inc | 2 +- lib/libc/stdlib/malloc/Makefile.inc | 3 +++ lib/libc/stdlib/{jemalloc => malloc}/Symbol.map | 0 lib/libc/stdlib/{ => malloc}/jemalloc/Makefile.inc | 2 -- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index caa95bf53951..413c9421c0ee 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -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" diff --git a/lib/libc/stdlib/malloc/Makefile.inc b/lib/libc/stdlib/malloc/Makefile.inc new file mode 100644 index 000000000000..bce4353fe80a --- /dev/null +++ b/lib/libc/stdlib/malloc/Makefile.inc @@ -0,0 +1,3 @@ +SYM_MAPS+=${LIBC_SRCTOP}/stdlib/malloc/Symbol.map + +.include "${LIBC_SRCTOP}/stdlib/malloc/jemalloc/Makefile.inc" diff --git a/lib/libc/stdlib/jemalloc/Symbol.map b/lib/libc/stdlib/malloc/Symbol.map similarity index 100% rename from lib/libc/stdlib/jemalloc/Symbol.map rename to lib/libc/stdlib/malloc/Symbol.map diff --git a/lib/libc/stdlib/jemalloc/Makefile.inc b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc similarity index 96% rename from lib/libc/stdlib/jemalloc/Makefile.inc rename to lib/libc/stdlib/malloc/jemalloc/Makefile.inc index edaa92790c5b..1ba7725fe8a8 100644 --- a/lib/libc/stdlib/jemalloc/Makefile.inc +++ b/lib/libc/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}