Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/stdlib Bounce the minimum allocation alignement for...



details:   https://anonhg.NetBSD.org/src/rev/17f10d3fafdf
branches:  trunk
changeset: 326777:17f10d3fafdf
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Feb 17 08:50:50 2014 +0000

description:
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:

 lib/libc/stdlib/jemalloc.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (47 lines):

diff -r 0088fb1fb521 -r 17f10d3fafdf lib/libc/stdlib/jemalloc.c
--- a/lib/libc/stdlib/jemalloc.c        Mon Feb 17 07:39:19 2014 +0000
+++ b/lib/libc/stdlib/jemalloc.c        Mon Feb 17 08:50:50 2014 +0000
@@ -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@localhost>.
@@ -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 @@
 #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 @@
 #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



Home | Main Index | Thread Index | Old Index