Commit 6349ae4d authored by Paul Eggert's avatar Paul Eggert

* alloc.c (inhibit_garbage_collection): Set gc_cons_threshold to max value.

Previously, this ceilinged at INT_MAX, but that doesn't work on
64-bit machines.
parent 211a0b2a
......@@ -14,6 +14,9 @@
These were 'int' variables that could overflow on 64-bit hosts;
they were never used, so remove them instead of repairing them.
(nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
(inhibit_garbage_collection): Set gc_cons_threshold to max value.
Previously, this ceilinged at INT_MAX, but that doesn't work on
64-bit machines.
* alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
(allocate_vectorlike): Check for ptrdiff_t overflow.
......
......@@ -4827,9 +4827,8 @@ int
inhibit_garbage_collection (void)
{
int count = SPECPDL_INDEX ();
int nbits = min (VALBITS, BITS_PER_INT);
specbind (Qgc_cons_threshold, make_number (((EMACS_INT) 1 << (nbits - 1)) - 1));
specbind (Qgc_cons_threshold, make_number (MOST_POSITIVE_FIXNUM));
return count;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment