From: Richard M. Stallman Date: Sat, 6 May 1995 23:04:13 +0000 (+0000) Subject: (gc_cons_threshold): Change back to int. X-Git-Tag: emacs-19.34~4131 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b580578b0c28011b4744aa348a7d4ba8fc982a77;p=emacs.git (gc_cons_threshold): Change back to int. (min): New macro. (inhibit_garbage_collection): Don't exceed value an int can hold. --- diff --git a/src/alloc.c b/src/alloc.c index c901a4dc228..063af1e19cb 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -45,6 +45,7 @@ extern __malloc_size_t _bytes_used; extern int __malloc_extra_blocks; #define max(A,B) ((A) > (B) ? (A) : (B)) +#define min(A,B) ((A) < (B) ? (A) : (B)) /* Macro to verify that storage intended for Lisp objects is not out of range to fit in the space for a pointer. @@ -69,7 +70,7 @@ static __malloc_size_t bytes_used_when_full; int consing_since_gc; /* Number of bytes of consing since gc before another gc should be done. */ -EMACS_INT gc_cons_threshold; +int gc_cons_threshold; /* Nonzero during gc */ int gc_in_progress; @@ -1321,8 +1322,9 @@ inhibit_garbage_collection () { int count = specpdl_ptr - specpdl; Lisp_Object number; + int nbits = min (VALBITS, INTBITS); - XSETINT (number, ((EMACS_INT) 1 << (VALBITS - 1)) - 1); + XSETINT (number, ((EMACS_INT) 1 << (nbits - 1)) - 1); specbind (Qgc_cons_threshold, number);