]> granicus.if.org Git - gc/commitdiff
Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 14 Nov 2016 16:52:35 +0000 (19:52 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 27 Nov 2016 08:56:22 +0000 (11:56 +0300)
* 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
extra/MacOS.c

index 805bd7287f1ac76f50bbd86b880b530944e70fe7..7d4fb6cf61d26f77afcd8ebacbc4b09e296f5a88 100644 (file)
@@ -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
index 3e0f075a5695b81bccfc2ede1b84c2153879550a..f1d71a0d29a7151758f100e0cdb5faa20f6120c1 100644 (file)
@@ -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)