emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108453: * alloc.c (CONS_BLOCK_SIZE):


From: Andreas Schwab
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108453: * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
Date: Sat, 02 Jun 2012 10:52:27 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108453
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Sat 2012-06-02 10:52:27 +0200
message:
  * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
  cons_block.
modified:
  src/ChangeLog
  src/alloc.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-06-01 20:49:03 +0000
+++ b/src/ChangeLog     2012-06-02 08:52:27 +0000
@@ -1,3 +1,8 @@
+2012-06-02  Andreas Schwab  <address@hidden>
+
+       * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
+       cons_block.
+
 2012-06-01  Paul Eggert  <address@hidden>
 
        * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2012-05-30 07:59:44 +0000
+++ b/src/alloc.c       2012-06-02 08:52:27 +0000
@@ -2701,8 +2701,10 @@
    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) \


reply via email to

[Prev in Thread] Current Thread [Next in Thread]