From 34b3045b9bd4110123189320500817fb07f9ce25 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 14:18:08 -0600 Subject: [PATCH] fix SGC Merge to 5.1.2 (cherry picked from commit 3f0914080bf4a48b241ffe05b70e098dfed3f01c) --- src/racket/sgc/sgc.c | 6 ++++-- src/racket/sgc/sgc.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/racket/sgc/sgc.c b/src/racket/sgc/sgc.c index 888f71dd4b..e29e7166e0 100644 --- a/src/racket/sgc/sgc.c +++ b/src/racket/sgc/sgc.c @@ -2108,9 +2108,11 @@ void GC_dump(void) FPRINTF(STDERR, "End Map\n"); } -intptr_t GC_get_memory_use() +long GC_get_memory_use() { - return mem_real_use; + /* returns a `long' instead of `intptr_t' for compatibility + with the Boehm GC */ + return (long)mem_real_use; } void GC_end_stubborn_change(void *p) diff --git a/src/racket/sgc/sgc.h b/src/racket/sgc/sgc.h index 30e8001408..a68844e80c 100644 --- a/src/racket/sgc/sgc.h +++ b/src/racket/sgc/sgc.h @@ -34,7 +34,7 @@ SGC_EXTERN void *GC_base(void *); SGC_EXTERN void GC_dump(void); -SGC_EXTERN intptr_t GC_get_memory_use(); +SGC_EXTERN long GC_get_memory_use(); SGC_EXTERN void GC_end_stubborn_change(void *);