From: Eli Zaretskii Date: Sun, 7 Oct 2012 18:33:10 +0000 (+0200) Subject: Don't abort when ralloc.c:relinquish cannot return a heap to the system. X-Git-Tag: emacs-24.2.90~237^2~75 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=98daa89356f6523c2c6663110d0c715f018b1a8b;p=emacs.git Don't abort when ralloc.c:relinquish cannot return a heap to the system. 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) --- diff --git a/src/ChangeLog b/src/ChangeLog index 526043c158e..29e831a2eb8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-10-07 Eli Zaretskii + + * 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 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506). diff --git a/src/ralloc.c b/src/ralloc.c index e4a8fe9c6da..11897411930 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -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;