summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
Diffstat (limited to 'libguile')
-rw-r--r--libguile/gc-malloc.c4
-rw-r--r--libguile/gc.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c
index 72142caaa..b7781f3e7 100644
--- a/libguile/gc-malloc.c
+++ b/libguile/gc-malloc.c
@@ -96,7 +96,11 @@ scm_realloc (void *mem, size_t size)
return ptr;
/* Time is hard: trigger a full, ``stop-the-world'' GC, and try again. */
+#ifdef HAVE_GC_GCOLLECT_AND_UNMAP
GC_gcollect_and_unmap ();
+#else
+ GC_gcollect ();
+#endif
SCM_SYSCALL (ptr = realloc (mem, size));
if (ptr)
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 ();
}