summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-10-07 09:42:32 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-10-07 09:42:32 -0700
commit84e8e185cdabbe547cb2b724c2ca1014a73efcfc (patch)
tree9ba0930c801764c187064c0decea5b165d395fbc /src/alloc.c
parentde0bde6284da06b603b578cc5d19002fd15f928d (diff)
* alloc.c: Add comment.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index f4db3abbd93..09ef4b085df 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4235,6 +4235,11 @@ mark_maybe_pointer (void *p)
}
+/* Alignment of Lisp_Object and pointer values. Use offsetof, as it
+ sometimes returns a smaller alignment than GCC's __alignof__ and
+ mark_memory might miss objects if __alignof__ were used. For
+ example, on x86 with WIDE_EMACS_INT, __alignof__ (Lisp_Object) is 8
+ but GC_LISP_OBJECT_ALIGNMENT should be 4. */
#ifndef GC_LISP_OBJECT_ALIGNMENT
# define GC_LISP_OBJECT_ALIGNMENT offsetof (struct {char a; Lisp_Object b;}, b)
#endif