From 577c52c4b21c779ba1998a6c26cdce2cfa74cd3a Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 17 Feb 2014 08:50:50 +0000 Subject: 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). --- lib/libc/stdlib/jemalloc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/libc/stdlib') 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 . @@ -118,7 +118,7 @@ #include /* __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 -- cgit