summaryrefslogtreecommitdiff
path: root/libguile/gc.c
diff options
context:
space:
mode:
authorChris K. Jester-Young <cky944@gmail.com>2011-12-08 21:13:30 +0100
committerAndy Wingo <wingo@pobox.com>2011-12-08 21:14:06 +0100
commit4eb286127c41e67eb90ef1b69f61f613bcd830b2 (patch)
tree579434eac5a642346037d10035d959d419ca75d1 /libguile/gc.c
parente7b2efd582a6146cd9e9c82a905b3e87bb86d046 (diff)
downloadguile-4eb286127c41e67eb90ef1b69f61f613bcd830b2.tar.gz
fix compilation with gc 7.1
* configure.ac: Add checks for GC_gcollect_and_unmap and GC_get_unmapped_bytes. * libguile/gc-malloc.c (scm_realloc): GC_gcollect() if we don't have GC_gcollect_and_unmap. * libguile/gc.c (GC_get_heap_usage_safe): Likewise, don't GC_get_unmapped_bytes if the function doesn't exist.
Diffstat (limited to 'libguile/gc.c')
-rw-r--r--libguile/gc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libguile/gc.c b/libguile/gc.c
index ff1ebe6b1..0ab27a5e6 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -205,7 +205,11 @@ GC_get_heap_usage_safe (GC_word *pheap_size, GC_word *pfree_bytes,
{
*pheap_size = GC_get_heap_size ();
*pfree_bytes = GC_get_free_bytes ();
+#ifdef HAVE_GC_GET_UNMAPPED_BYTES
*punmapped_bytes = GC_get_unmapped_bytes ();
+#else
+ *punmapped_bytes = 0;
+#endif
*pbytes_since_gc = GC_get_bytes_since_gc ();
*ptotal_bytes = GC_get_total_bytes ();
}