From: Paul Eggert Date: Sun, 31 Jul 2011 19:50:12 +0000 (-0700) Subject: * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc. X-Git-Tag: v0.1~2040 X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=94122ae4818e7808c99303a0d2094ee9c6a2b843 * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc. This is a performance improvement for 64-bit hosts: it causes the value of DEFAULT_MXFAST to track what's in glibc on such hosts. --- diff --git a/ChangeLog b/ChangeLog index 077372b74..a563a1a11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-07-31 Paul Eggert + + * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc. + This is a performance improvement for 64-bit hosts: it causes the + value of DEFAULT_MXFAST to track what's in glibc on such hosts. + 2011-07-31 Bruno Haible stdioext: Add support for Minix. diff --git a/lib/xalloc.h b/lib/xalloc.h index b792aeffd..987791bf2 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -192,9 +192,9 @@ x2nrealloc (void *p, size_t *pn, size_t s) { /* The approximate size to use for initial small allocation requests, when the invoking code specifies an old size of - zero. 64 bytes is the largest "small" request for the - GNU C library malloc. */ - enum { DEFAULT_MXFAST = 64 }; + zero. This is the largest "small" request for the GNU C + library malloc. */ + enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; n = DEFAULT_MXFAST / s; n += !n;