summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2014-02-17 08:50:50 +0000
committermartin <martin@NetBSD.org>2014-02-17 08:50:50 +0000
commit577c52c4b21c779ba1998a6c26cdce2cfa74cd3a (patch)
tree859c67ed6c74ff465d4de517851002234dffb23d /lib
parent0744b666536a70dd74acb85cd2dad5d9fea70793 (diff)
Bounce the minimum allocation alignement for sparc64 and amd64 as well,
to sync with their default gcc configuration. We could relax this again later, after a filing a defect report with the ISO C comitee and getting an answer contradicting the gcc teams interpretation (and then fix the gcc target configurations instead).
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/jemalloc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/libc/stdlib/jemalloc.c b/lib/libc/stdlib/jemalloc.c
index 9f5655aa54e..03318bc8634 100644
--- a/lib/libc/stdlib/jemalloc.c
+++ b/lib/libc/stdlib/jemalloc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: jemalloc.c,v 1.30 2014/02/05 11:32:15 skrll Exp $ */
+/* $NetBSD: jemalloc.c,v 1.31 2014/02/17 08:50:50 martin Exp $ */
/*-
* Copyright (C) 2006,2007 Jason Evans <jasone@FreeBSD.org>.
@@ -118,7 +118,7 @@
#include <sys/cdefs.h>
/* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */
-__RCSID("$NetBSD: jemalloc.c,v 1.30 2014/02/05 11:32:15 skrll Exp $");
+__RCSID("$NetBSD: jemalloc.c,v 1.31 2014/02/17 08:50:50 martin Exp $");
#ifdef __FreeBSD__
#include "libc_private.h"
@@ -216,6 +216,14 @@ __strerror_r(int e, char *s, size_t l)
#define STRERROR_BUF 64
/* Minimum alignment of allocations is 2^QUANTUM_2POW_MIN bytes. */
+
+/*
+ * If you touch the TINY_MIN_2POW definition for any architecture, please
+ * make sure to adjust the corresponding definition for JEMALLOC_TINY_MIN_2POW
+ * in the gcc 4.8 tree in dist/gcc/tree-ssa-ccp.c and verify that a native
+ * gcc is still buildable!
+ */
+
#ifdef __i386__
# define QUANTUM_2POW_MIN 4
# define SIZEOF_PTR_2POW 2
@@ -234,11 +242,13 @@ __strerror_r(int e, char *s, size_t l)
#ifdef __sparc64__
# define QUANTUM_2POW_MIN 4
# define SIZEOF_PTR_2POW 3
+# define TINY_MIN_2POW 3
# define NO_TLS
#endif
#ifdef __amd64__
# define QUANTUM_2POW_MIN 4
# define SIZEOF_PTR_2POW 3
+# define TINY_MIN_2POW 3
#endif
#ifdef __arm__
# define QUANTUM_2POW_MIN 3