From: Andreas Schwab Date: Sat, 2 Jun 2012 08:52:27 +0000 (+0200) Subject: * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of X-Git-Tag: emacs-24.2.90~471^2~6^2~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a282161184c51eba3381b257f2fe2939b79cd576;p=emacs.git * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of cons_block. --- diff --git a/src/ChangeLog b/src/ChangeLog index 72c76bf9fb0..1d48a6ff155 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-06-02 Andreas Schwab + + * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of + cons_block. + 2012-06-01 Paul Eggert * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change. diff --git a/src/alloc.c b/src/alloc.c index cf7778c05f6..7c461c5a6af 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -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) \