From 8946b1289b4ab976588274fb850e0afa1626b678 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 14 Nov 2016 19:52:35 +0300 Subject: [PATCH] Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra) * extra/AmigaOS.c (GC_amiga_get_mem): Define only if GC_AMIGA_FASTALLOC. * extra/MacOS.c (TemporaryMemoryBlock, TemporaryMemoryHandle, struct TemporaryMemoryBlock, theTemporaryMemory, GC_MacTemporaryNewPtr, perform_final_collection, GC_MacFreeTemporaryMemory): Define only if USE_TEMPORARY_MEMORY. --- extra/AmigaOS.c | 4 +++- extra/MacOS.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/extra/AmigaOS.c b/extra/AmigaOS.c index 012a8d4c..b1497081 100644 --- a/extra/AmigaOS.c +++ b/extra/AmigaOS.c @@ -260,6 +260,8 @@ size_t latestsize; #endif +#ifdef GC_AMIGA_FASTALLOC + /* * The actual function that is called with the GET_MEM macro. * @@ -296,7 +298,7 @@ void *GC_amiga_get_mem(size_t size){ } - +#endif #ifndef GC_AMIGA_ONLYFAST diff --git a/extra/MacOS.c b/extra/MacOS.c index d7d141ff..624b383d 100644 --- a/extra/MacOS.c +++ b/extra/MacOS.c @@ -48,6 +48,8 @@ void* GC_MacGetDataStart(void) return 0; } +#ifdef USE_TEMPORARY_MEMORY + /* track the use of temporary memory so it can be freed all at once. */ typedef struct TemporaryMemoryBlock TemporaryMemoryBlock, **TemporaryMemoryHandle; @@ -145,6 +147,8 @@ void GC_MacFreeTemporaryMemory(void) } } +#endif /* USE_TEMPORARY_MEMORY */ + #if __option(far_data) void* GC_MacGetDataEnd(void) -- 2.40.0