From 765f69f0d9185a7d0f72f8c4b4c18d9439148c13 Mon Sep 17 00:00:00 2001 From: ivmai Date: Thu, 17 Sep 2009 07:18:33 +0000 Subject: [PATCH] 2009-09-17 Ivan Maidanski * alloc.c (GC_collect_or_expand): Output heap size in WARN() (before returning FALSE) for convenience. --- ChangeLog | 5 +++++ alloc.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7cae160d..37d717d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-17 Ivan Maidanski + + * alloc.c (GC_collect_or_expand): Output heap size in WARN() + (before returning FALSE) for convenience. + 2009-09-17 Ivan Maidanski (ivmai139.diff) diff --git a/alloc.c b/alloc.c index aca17707..da938d6f 100644 --- a/alloc.c +++ b/alloc.c @@ -1137,7 +1137,9 @@ GC_bool GC_collect_or_expand(word needed_blocks, GC_bool ignore_off_page) GC_gcollect_inner(); } else { # if !defined(AMIGA) || !defined(GC_AMIGA_FASTALLOC) - WARN("Out of Memory! Returning NIL!\n", 0); + WARN("Out of Memory! Heap size: %" GC_PRIdPTR " MiB." + " Returning NIL!\n", + (GC_heapsize - GC_unmapped_bytes) >> 20); # endif return(FALSE); } -- 2.40.0