diff options
| author | Eli Zaretskii | 2012-10-07 20:33:10 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-10-07 20:33:10 +0200 |
| commit | 98daa89356f6523c2c6663110d0c715f018b1a8b (patch) | |
| tree | 1a623875528879dddf2e64efee8e10c0ca22fae1 /src/ralloc.c | |
| parent | 0aada74e88baf554a1bf95bce9373d9ac76429ad (diff) | |
| download | emacs-98daa89356f6523c2c6663110d0c715f018b1a8b.tar.gz emacs-98daa89356f6523c2c6663110d0c715f018b1a8b.zip | |
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)
Diffstat (limited to 'src/ralloc.c')
| -rw-r--r-- | src/ralloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) | |||
| 327 | 327 | ||
| 328 | if ((char *)last_heap->end - (char *)last_heap->bloc_start <= excess) | 328 | if ((char *)last_heap->end - (char *)last_heap->bloc_start <= excess) |
| 329 | { | 329 | { |
| 330 | /* This heap should have no blocs in it. */ | 330 | /* This heap should have no blocs in it. If it does, we |
| 331 | cannot return it to the system. */ | ||
| 331 | if (last_heap->first_bloc != NIL_BLOC | 332 | if (last_heap->first_bloc != NIL_BLOC |
| 332 | || last_heap->last_bloc != NIL_BLOC) | 333 | || last_heap->last_bloc != NIL_BLOC) |
| 333 | emacs_abort (); | 334 | return; |
| 334 | 335 | ||
| 335 | /* Return the last heap, with its header, to the system. */ | 336 | /* Return the last heap, with its header, to the system. */ |
| 336 | excess = (char *)last_heap->end - (char *)last_heap->start; | 337 | excess = (char *)last_heap->end - (char *)last_heap->start; |