changeset 11727:53ccd2d608ee

(gc_cons_threshold): Change back to int. (min): New macro. (inhibit_garbage_collection): Don't exceed value an int can hold.
author Richard M. Stallman <rms@gnu.org>
date Sat, 06 May 1995 23:04:13 +0000
parents 77a296d0ab90
children affed1766d34
files src/alloc.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Sat May 06 23:03:00 1995 +0000
+++ b/src/alloc.c	Sat May 06 23:04:13 1995 +0000
@@ -45,6 +45,7 @@
 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 @@
 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 @@
 {
   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);