[MLton-commit] r5812

Matthew Fluet fluet at mlton.org
Thu Aug 2 12:41:39 PDT 2007


HW_MEMSIZE 'sees' more than 2GB on Darwin
----------------------------------------------------------------------

U   mlton/trunk/runtime/platform/sysctl.c

----------------------------------------------------------------------

Modified: mlton/trunk/runtime/platform/sysctl.c
===================================================================
--- mlton/trunk/runtime/platform/sysctl.c	2007-08-02 19:04:47 UTC (rev 5811)
+++ mlton/trunk/runtime/platform/sysctl.c	2007-08-02 19:41:38 UTC (rev 5812)
@@ -48,7 +48,11 @@
 
   len = 0;
   mib[0] = CTL_HW;
-#ifdef HW_PHYSMEM64
+#if defined(HW_MEMSIZE)
+  /* Darwin */
+  mib[1] = HW_MEMSIZE;
+#elif defined(HW_PHYSMEM64)
+  /* NetBSD */
   mib[1] = HW_PHYSMEM64;
 #else
   mib[1] = HW_PHYSMEM;




More information about the MLton-commit mailing list