Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdlib Hook for jemalloc



details:   https://anonhg.NetBSD.org/src/rev/abf979eb04e3
branches:  trunk
changeset: 449361:abf979eb04e3
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 04 17:30:33 2019 +0000

description:
Hook for jemalloc

diffstat:

 lib/libc/stdlib/Makefile.inc |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r 41928c5cc239 -r abf979eb04e3 lib/libc/stdlib/Makefile.inc
--- a/lib/libc/stdlib/Makefile.inc      Mon Mar 04 17:29:49 2019 +0000
+++ b/lib/libc/stdlib/Makefile.inc      Mon Mar 04 17:30:33 2019 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile.inc,v 1.94 2018/01/05 20:51:13 snj Exp $
+#      $NetBSD: Makefile.inc,v 1.95 2019/03/04 17:30:33 christos Exp $
 #      from: @(#)Makefile.inc  8.3 (Berkeley) 2/4/95
 
 # stdlib sources
 .PATH: ${ARCHDIR}/stdlib ${.CURDIR}/stdlib
 
 SRCS+= _env.c _rand48.c \
-       a64l.c abort.c aligned_alloc.c atexit.c atof.c atoi.c atol.c atoll.c \
+       a64l.c abort.c atexit.c atof.c atoi.c atol.c atoll.c \
        bsearch.c cxa_thread_atexit.c drand48.c exit.c \
        getenv.c getopt.c getopt_long.c getsubopt.c \
        hcreate.c heapsort.c imaxdiv.c insque.c jrand48.c l64a.c lldiv.c \
@@ -26,11 +26,15 @@
 SRCS+= erand48_ieee754.c
 
 .if ${RUMPRUN} != "yes"
-.if (${USE_JEMALLOC} != "no")
-SRCS+= jemalloc.c
-.else
+.   if (${USE_JEMALLOC} != "no")
+.      if ${HAVE_JEMALLOC} > 100
+.         include "${NETBSDSRCDIR}/external/bsd/jemalloc/lib/Makefile.inc"
+.      else
+SRCS+= jemalloc.c aligned_alloc.c
+.      endif 
+.   else
 SRCS+= malloc.c
-.endif
+.   endif
 .endif
 
 CPPFLAGS.strtol.c+=    -I${LIBCDIR}/../../common/lib/libc/stdlib



Home | Main Index | Thread Index | Old Index