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 7cae160..37d717d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
 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)
 
        * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
diff --git a/alloc.c b/alloc.c
index aca1770..da938d6 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);
        }