]> git.eshelyaron.com Git - emacs.git/commitdiff
Port --enable-checking=all to Fedora 14 x86-64.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Sep 2011 07:16:38 +0000 (00:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Sep 2011 07:16:38 +0000 (00:16 -0700)
* charset.c (syms_of_charset): Also account for glibc malloc's
internal overhead when calculating the initial malloc maximum.

src/ChangeLog
src/charset.c

index d6e5390c84f93d0b66ba69479dffcee60bda59b6..d976234f0c54c9ca73328fa7aa0301c9242edb22 100644 (file)
@@ -1,5 +1,9 @@
 2011-09-30  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
index 1209ac6b68dcc2d3818d2d66f26a57ae8b8ce212..f1b4897ffe65f85f666484c73019512cec38c15f 100644 (file)
@@ -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)
   };