summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 3939e704978..7d1ff7625f2 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -155,7 +155,7 @@ static pthread_mutex_t alloc_mutex;
/* Default value of gc_cons_threshold (see below). */
-#define GC_DEFAULT_THRESHOLD (100000 * sizeof (Lisp_Object))
+#define GC_DEFAULT_THRESHOLD (100000 * word_size)
/* Global variables. */
struct emacs_globals globals;
@@ -278,14 +278,6 @@ static void sweep_strings (void);
static void free_misc (Lisp_Object);
extern Lisp_Object which_symbols (Lisp_Object, EMACS_INT) EXTERNALLY_VISIBLE;
-/* Handy constants for vectorlike objects. */
-enum
- {
- header_size = offsetof (struct Lisp_Vector, contents),
- bool_header_size = offsetof (struct Lisp_Bool_Vector, data),
- word_size = sizeof (Lisp_Object)
- };
-
/* When scanning the C stack for live Lisp objects, Emacs keeps track
of what memory allocated via lisp_malloc is intended for what
purpose. This enumeration specifies the type of memory. */
@@ -2810,9 +2802,9 @@ listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...)
Lisp_Object val, *objp;
/* Change to SAFE_ALLOCA if you hit this eassert. */
- eassert (count <= MAX_ALLOCA / sizeof (Lisp_Object));
+ eassert (count <= MAX_ALLOCA / word_size);
- objp = alloca (count * sizeof (Lisp_Object));
+ objp = alloca (count * word_size);
objp[0] = arg;
va_start (ap, arg);
for (i = 1; i < count; i++)