aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2011-09-30 00:16:38 -0700
committerPaul Eggert <[email protected]>2011-09-30 00:16:38 -0700
commit3930c88bfc6d4e0d98baf6edabb78dec58090938 (patch)
treeb824693958dbebcc2fd75fbb97aca998a3cb2b5d /src
parentcb993c584c8ef91f5352ec9aa97d26fd76cfd643 (diff)
Port --enable-checking=all to Fedora 14 x86-64.
* charset.c (syms_of_charset): Also account for glibc malloc's internal overhead when calculating the initial malloc maximum.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/charset.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d6e5390c84..d976234f0c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2011-09-30 Paul Eggert <[email protected]>
+ Port --enable-checking=all to Fedora 14 x86-64.
+ * charset.c (syms_of_charset): Also account for glibc malloc's
+ internal overhead when calculating the initial malloc maximum.
+
Port --enable-checking=all to Fedora 14 x86.
* alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
Move to lisp.h.
diff --git a/src/charset.c b/src/charset.c
index 1209ac6b68..f1b4897ffe 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -2337,7 +2337,9 @@ syms_of_charset (void)
mmap for larger allocations, and these don't work well across dumped
systems. */
enum {
- initial_malloc_max = (1 << 16) - 1 - XMALLOC_OVERRUN_CHECK_OVERHEAD,
+ glibc_malloc_overhead = 3 * sizeof (size_t) - 1,
+ initial_malloc_max =
+ (1 << 16) - 1 - glibc_malloc_overhead - XMALLOC_OVERRUN_CHECK_OVERHEAD,
charset_table_size_init = initial_malloc_max / sizeof (struct charset)
};