]> code.delx.au - gnu-emacs/commitdiff
* alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
authorAndreas Schwab <schwab@linux-m68k.org>
Sat, 2 Jun 2012 08:52:27 +0000 (10:52 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Sat, 2 Jun 2012 08:52:27 +0000 (10:52 +0200)
cons_block.

src/ChangeLog
src/alloc.c

index 72c76bf9fb0f36a9cb2aea48d1539136cceda937..1d48a6ff15509f3e92c2825fe5d4d55e63e84ecd 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-02  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
+       cons_block.
+
 2012-06-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
index cf7778c05f656ad06b65e30e367da3bd6a66a973..7c461c5a6affbd0c66145c42f40e922584d128d9 100644 (file)
@@ -2701,8 +2701,10 @@ make_float (double float_value)
    GC are put on a free list to be reallocated before allocating
    any new cons cells from the latest cons_block.  */
 
-#define CONS_BLOCK_SIZE \
-  (((BLOCK_BYTES - sizeof (struct cons_block *)) * CHAR_BIT) \
+#define CONS_BLOCK_SIZE                                                \
+  (((BLOCK_BYTES - sizeof (struct cons_block *)                        \
+     /* The compiler might add padding at the end.  */         \
+     - (sizeof (struct Lisp_Cons) - sizeof (int))) * CHAR_BIT) \
    / (sizeof (struct Lisp_Cons) * CHAR_BIT + 1))
 
 #define CONS_BLOCK(fptr) \