summaryrefslogtreecommitdiff
path: root/lib/xalloc.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-31 12:50:12 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-31 12:50:30 -0700
commit94122ae4818e7808c99303a0d2094ee9c6a2b843 (patch)
treee64ce80262e9b750f2b7752e49e6017077c33063 /lib/xalloc.h
parentd4d84c1d916f5bff3bb72be92e9d1383a25077c1 (diff)
downloadgnulib-94122ae4818e7808c99303a0d2094ee9c6a2b843.tar.gz
* 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.
Diffstat (limited to 'lib/xalloc.h')
-rw-r--r--lib/xalloc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/xalloc.h b/lib/xalloc.h
index b792aeffdd..987791bf2a 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;