[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc.
From: |
Paul Eggert |
Subject: |
[PATCH] * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc. |
Date: |
Sun, 31 Jul 2011 12:52:32 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
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.
---
ChangeLog | 6 ++++++
lib/xalloc.h | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 596656e..056c9a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-31 Paul Eggert <address@hidden>
+
+ * 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 <address@hidden>
stdioext: Add support for Minix.
diff --git a/lib/xalloc.h b/lib/xalloc.h
index b792aef..987791b 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;
--
1.7.4.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc.,
Paul Eggert <=