]> granicus.if.org Git - gc/commitdiff
2009-09-17 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Thu, 17 Sep 2009 07:18:33 +0000 (07:18 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:47 +0000 (21:06 +0400)
* alloc.c (GC_collect_or_expand): Output heap size in WARN()
(before returning FALSE) for convenience.

ChangeLog
alloc.c

index 7cae160d287a100f0a9620081a521b24b724a69e..37d717d445d0d543fb7a4a3a185c893a501692d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_collect_or_expand): Output heap size in WARN()
+       (before returning FALSE) for convenience.
+
 2009-09-17  Ivan Maidanski <ivmai@mail.ru>
        (ivmai139.diff)
 
diff --git a/alloc.c b/alloc.c
index aca177073e45d2007c380b4a977593ffc4086c68..da938d6ff2f6ff69be59e1fb5988e648cdc2a864 100644 (file)
--- 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);
        }