FIX Physical memory information on MacOSX 24/13024/2
Bruno JOFRET [Tue, 29 Oct 2013 12:42:43 +0000 (13:42 +0100)]
Change-Id: I70f7aad33bf897b72f573a4b81ea8d920104dc57

scilab/modules/core/sci_gateway/c/sci_stacksize.c

index efbd6a3..54935df 100644 (file)
@@ -260,7 +260,7 @@ static int setStacksizeMax(char *fname)
     freePhysicalMem =  (long long)(statex.ullAvailPageFile / sizeof(double));
     //if free memory is used, keep 10% to OS
 #else
-    freePhysicalMem = (long long)((sysconf(_SC_AVPHYS_PAGES) * sysconf(_SC_PAGE_SIZE)) / sizeof(double));
+    freePhysicalMem = (long long)((get_avphys_pages() * get_phys_pages()) / sizeof(double));
 #endif
 
     if (freePhysicalMem > 0 && freePhysicalMem < maxmemfree)