From: Ivan Maidanski Date: Mon, 14 Nov 2016 16:52:35 +0000 (+0300) Subject: Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra) X-Git-Tag: v7.4.6~205 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec6501f27c80559f9d40c713ee0e11c5a5c28714;p=gc 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. --- diff --git a/extra/AmigaOS.c b/extra/AmigaOS.c index 805bd728..7d4fb6cf 100644 --- a/extra/AmigaOS.c +++ b/extra/AmigaOS.c @@ -340,6 +340,8 @@ size_t latestsize; #endif +#ifdef GC_AMIGA_FASTALLOC + /* * The actual function that is called with the GET_MEM macro. * @@ -376,7 +378,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 3e0f075a..f1d71a0d 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; @@ -140,6 +142,8 @@ void GC_MacFreeTemporaryMemory(void) } } +#endif /* USE_TEMPORARY_MEMORY */ + #if __option(far_data) void* GC_MacGetDataEnd(void)