aboutsummaryrefslogtreecommitdiffstats
path: root/src/charset.c
diff options
context:
space:
mode:
authorPaul Eggert2011-09-30 00:16:38 -0700
committerPaul Eggert2011-09-30 00:16:38 -0700
commit3930c88bfc6d4e0d98baf6edabb78dec58090938 (patch)
treeb824693958dbebcc2fd75fbb97aca998a3cb2b5d /src/charset.c
parentcb993c584c8ef91f5352ec9aa97d26fd76cfd643 (diff)
downloademacs-3930c88bfc6d4e0d98baf6edabb78dec58090938.tar.gz
emacs-3930c88bfc6d4e0d98baf6edabb78dec58090938.zip
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/charset.c')
-rw-r--r--src/charset.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/charset.c b/src/charset.c
index 1209ac6b68d..f1b4897ffe6 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -2337,7 +2337,9 @@ syms_of_charset (void)
2337 mmap for larger allocations, and these don't work well across dumped 2337 mmap for larger allocations, and these don't work well across dumped
2338 systems. */ 2338 systems. */
2339 enum { 2339 enum {
2340 initial_malloc_max = (1 << 16) - 1 - XMALLOC_OVERRUN_CHECK_OVERHEAD, 2340 glibc_malloc_overhead = 3 * sizeof (size_t) - 1,
2341 initial_malloc_max =
2342 (1 << 16) - 1 - glibc_malloc_overhead - XMALLOC_OVERRUN_CHECK_OVERHEAD,
2341 charset_table_size_init = initial_malloc_max / sizeof (struct charset) 2343 charset_table_size_init = initial_malloc_max / sizeof (struct charset)
2342 }; 2344 };
2343 2345