]> git.eshelyaron.com Git - emacs.git/commitdiff
Don’t increase consing_until_gc when out of memory
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Aug 2019 19:28:53 +0000 (12:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Aug 2019 19:29:13 +0000 (12:29 -0700)
* src/alloc.c (memory_full): Don’t increase consing_until_gc.
Suggested by Eli Zaretskii (Bug#37006#46).

src/alloc.c

index 14b0a7b8381c836fe531ca006ba5d9f4fbeb060d..0548a09cb8bc1a2ede4e2206f08a8855eb6720d4 100644 (file)
@@ -3866,7 +3866,7 @@ memory_full (size_t nbytes)
   if (! enough_free_memory)
     {
       Vmemory_full = Qt;
-      consing_until_gc = memory_full_cons_threshold;
+      consing_until_gc = min (consing_until_gc, memory_full_cons_threshold);
 
       /* The first time we get here, free the spare memory.  */
       for (int i = 0; i < ARRAYELTS (spare_memory); i++)