diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index 86127dd5197..f21f0b4fa3a 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -315,6 +315,7 @@ static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); | |||
| 315 | on free lists recognizable in O(1). */ | 315 | on free lists recognizable in O(1). */ |
| 316 | 316 | ||
| 317 | static Lisp_Object Vdead; | 317 | static Lisp_Object Vdead; |
| 318 | #define DEADP(x) EQ (x, Vdead) | ||
| 318 | 319 | ||
| 319 | #ifdef GC_MALLOC_CHECK | 320 | #ifdef GC_MALLOC_CHECK |
| 320 | 321 | ||
| @@ -411,6 +412,10 @@ static void check_gcpros (void); | |||
| 411 | 412 | ||
| 412 | #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ | 413 | #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ |
| 413 | 414 | ||
| 415 | #ifndef DEADP | ||
| 416 | # define DEADP(x) 0 | ||
| 417 | #endif | ||
| 418 | |||
| 414 | /* Recording what needs to be marked for gc. */ | 419 | /* Recording what needs to be marked for gc. */ |
| 415 | 420 | ||
| 416 | struct gcpro *gcprolist; | 421 | struct gcpro *gcprolist; |
| @@ -877,7 +882,7 @@ safe_alloca_unwind (Lisp_Object arg) | |||
| 877 | 882 | ||
| 878 | /* Like malloc but used for allocating Lisp data. NBYTES is the | 883 | /* Like malloc but used for allocating Lisp data. NBYTES is the |
| 879 | number of bytes to allocate, TYPE describes the intended use of the | 884 | number of bytes to allocate, TYPE describes the intended use of the |
| 880 | allcated memory block (for strings, for conses, ...). */ | 885 | allocated memory block (for strings, for conses, ...). */ |
| 881 | 886 | ||
| 882 | #ifndef USE_LSB_TAG | 887 | #ifndef USE_LSB_TAG |
| 883 | static void *lisp_malloc_loser; | 888 | static void *lisp_malloc_loser; |
| @@ -1407,7 +1412,7 @@ uninterrupt_malloc (void) | |||
| 1407 | #ifdef DOUG_LEA_MALLOC | 1412 | #ifdef DOUG_LEA_MALLOC |
| 1408 | pthread_mutexattr_t attr; | 1413 | pthread_mutexattr_t attr; |
| 1409 | 1414 | ||
| 1410 | /* GLIBC has a faster way to do this, but lets keep it portable. | 1415 | /* GLIBC has a faster way to do this, but let's keep it portable. |
| 1411 | This is according to the Single UNIX Specification. */ | 1416 | This is according to the Single UNIX Specification. */ |
| 1412 | pthread_mutexattr_init (&attr); | 1417 | pthread_mutexattr_init (&attr); |
| 1413 | pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); | 1418 | pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); |
| @@ -6262,7 +6267,7 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max) | |||
| 6262 | ptrdiff_t gc_count = inhibit_garbage_collection (); | 6267 | ptrdiff_t gc_count = inhibit_garbage_collection (); |
| 6263 | Lisp_Object found = Qnil; | 6268 | Lisp_Object found = Qnil; |
| 6264 | 6269 | ||
| 6265 | if (!EQ (obj, Vdead)) | 6270 | if (! DEADP (obj)) |
| 6266 | { | 6271 | { |
| 6267 | for (sblk = symbol_block; sblk; sblk = sblk->next) | 6272 | for (sblk = symbol_block; sblk; sblk = sblk->next) |
| 6268 | { | 6273 | { |