[MLton-commit] r4573

Matthew Fluet MLton@mlton.org
Tue, 23 May 2006 19:24:50 -0700


Drop unused GC_availRam
----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/gc/sysvals.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/sysconf.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform.h

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

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c	2006-05-24 02:18:53 UTC (rev 4572)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c	2006-05-24 02:24:47 UTC (rev 4573)
@@ -283,7 +283,6 @@
   sigemptyset (&s->signalsInfo.signalsHandled);
   sigemptyset (&s->signalsInfo.signalsPending);
   s->startTime = getCurrentTime ();
-  s->sysvals.availRam = GC_availRam ();
   s->sysvals.totalRam = GC_totalRam ();
   s->sysvals.pageSize = GC_pageSize ();
   s->weaks = NULL;

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/sysvals.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/sysvals.h	2006-05-24 02:18:53 UTC (rev 4572)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/sysvals.h	2006-05-24 02:24:47 UTC (rev 4573)
@@ -10,7 +10,6 @@
 
 struct GC_sysvals {
   size_t ram;
-  size_t availRam;
   size_t totalRam;
   size_t pageSize;
 };

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c	2006-05-24 02:18:53 UTC (rev 4572)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c	2006-05-24 02:24:47 UTC (rev 4573)
@@ -54,18 +54,6 @@
         return mem;
 }
 
-// Not quite right... what does 'available' mean anyways?!
-// This returns the number of bytes available to userspace programs.
-size_t GC_availRam (void) {
-        int mem;
-        size_t len;
-
-        len = sizeof (int);
-        if (-1 == sysctlbyname ("hw.usermem", &mem, &len, NULL, 0))
-                diee ("sysctl failed");
-        return mem;
-}
-
 // This is not windows
 __attribute__ ((noreturn))
 C_Errno_t(C_PId_t) MLton_Process_cwait (__attribute__ ((unused)) C_PId_t pid, 

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/sysconf.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/sysconf.c	2006-05-24 02:18:53 UTC (rev 4572)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/sysconf.c	2006-05-24 02:24:47 UTC (rev 4573)
@@ -12,11 +12,3 @@
   tmp = sysconf (_SC_PHYS_PAGES);
   return pageSize * (size_t)tmp;
 }
-
-size_t GC_availRam (void) {
-  size_t pageSize = GC_pageSize ();
-  long int tmp;
-
-  tmp = sysconf (_SC_AVPHYS_PAGES);
-  return pageSize * (size_t)tmp;
-}

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h	2006-05-24 02:18:53 UTC (rev 4572)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h	2006-05-24 02:24:47 UTC (rev 4573)
@@ -153,7 +153,6 @@
 
 size_t GC_pageSize (void);
 size_t GC_totalRam (void);
-size_t GC_availRam (void);
 
 void GC_setCygwinUseMmap (bool b);