X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MemoryLimit.cxx;h=f513d82a05a8df57c69af379e7ea755d1fc82a25;hb=2f529dcd2629679dadcca3047583bfcf28ca7b1a;hp=c254b50ba6234008ba8ab3cd04f71a5728380c57;hpb=c98d9fcd7f02c1f1f5c24dd3e709ed75228d66c4;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_MemoryLimit.cxx b/src/SMDS/SMDS_MemoryLimit.cxx index c254b50ba..f513d82a0 100644 --- a/src/SMDS/SMDS_MemoryLimit.cxx +++ b/src/SMDS/SMDS_MemoryLimit.cxx @@ -25,7 +25,7 @@ // This is not done inside a function of SALOME because allocated memory is not always // returned to the system. (PAL16631) // -#ifndef WIN32 +#if !defined WIN32 && !defined __APPLE__ #include #endif @@ -36,17 +36,17 @@ int main (int argc, char ** argv) { // To better understand what is going on here, consult bug [SALOME platform 0019911] -#ifndef WIN32 +#if !defined WIN32 && !defined __APPLE__ struct sysinfo si; int err = sysinfo( &si ); if ( err ) return -1; unsigned long freeRamKb = ( si.freeram * si.mem_unit ) / 1024; - // totat RAM size in Gb, float is in order not to have 1 instead of 1.9 + // total RAM size in Gb, float is in order not to have 1 instead of 1.9 float totalramGb = float( si.totalram * si.mem_unit ) / 1024 / 1024 / 1024; - // nb Kbites to allocate at one step. Small nb leads to hung up + // nb Kbytes to allocate at one step. Small nb leads to hung up const int stepKb = int( 5 * totalramGb ); unsigned long nbSteps = freeRamKb / stepKb * 2;