summaryrefslogtreecommitdiff
path: root/MacOS.c
diff options
context:
space:
mode:
Diffstat (limited to 'MacOS.c')
-rw-r--r--MacOS.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/MacOS.c b/MacOS.c
index 7855c935..cc12cd15 100644
--- a/MacOS.c
+++ b/MacOS.c
@@ -8,7 +8,8 @@
11/22/94 pcb StripAddress the temporary memory handle for 24-bit mode.
11/30/94 pcb Tracking all memory usage so we can deallocate it all at once.
- 02/10/96 pcb Added routine to perform a final collection when unloading shared library.
+ 02/10/96 pcb Added routine to perform a final collection when
+unloading shared library.
by Patrick C. Beard.
*/
@@ -127,10 +128,27 @@ void GC_MacFreeTemporaryMemory()
}
theTemporaryMemory = NULL;
-# if !defined(SHARED_LIBRARY_BUILD)
+# if !defined(SILENT) && !defined(SHARED_LIBRARY_BUILD)
fprintf(stdout, "[total memory used: %ld bytes.]\n",
totalMemoryUsed);
fprintf(stdout, "[total collections: %ld.]\n", GC_gc_no);
# endif
}
}
+
+#if __option(far_data)
+
+ void* GC_MacGetDataEnd()
+ {
+ CodeZeroHandle code0 = (CodeZeroHandle)GetResource('CODE', 0);
+ if (code0) {
+ long aboveA5Size = (**code0).aboveA5;
+ ReleaseResource((Handle)code0);
+ return (LMGetCurrentA5() + aboveA5Size);
+ }
+ fprintf(stderr, "Couldn't load the jump table.");
+ exit(-1);
+ return 0;
+ }
+
+#endif /* __option(far_data) */