Don't abort when ralloc.c:relinquish cannot return a heap to the system.
authorEli Zaretskii <eliz@gnu.org>
Sun, 7 Oct 2012 18:33:10 +0000 (20:33 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 7 Oct 2012 18:33:10 +0000 (20:33 +0200)
 src/ralloc.c (relinquish): If a heap is ready to be relinquished,
 but it still has blocs in it, don't return it to the system,
 instead of aborting.  (Bug#12402)

src/ChangeLog
src/ralloc.c

index 526043c..29e831a 100644 (file)
@@ -1,3 +1,9 @@
+2012-10-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * ralloc.c (relinquish): If a heap is ready to be relinquished,
+       but it still has blocs in it, don't return it to the system,
+       instead of aborting.  (Bug#12402)
+
 2012-10-07  Jan Djärv  <jan.h.d@swipnet.se>
 
        * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
index e4a8fe9..1189741 100644 (file)
@@ -327,10 +327,11 @@ relinquish (void)
 
       if ((char *)last_heap->end - (char *)last_heap->bloc_start <= excess)
        {
-         /* This heap should have no blocs in it.  */
+         /* This heap should have no blocs in it.  If it does, we
+            cannot return it to the system.  */
          if (last_heap->first_bloc != NIL_BLOC
              || last_heap->last_bloc != NIL_BLOC)
-           emacs_abort ();
+           return;
 
          /* Return the last heap, with its header, to the system.  */
          excess = (char *)last_heap->end - (char *)last_heap->start;