I have been unable to find a php function to determine available system
memory (physical and swap)?

Right now I am using something like:
=========
# ensure there is enough free memory for the download
$free = shell_exec('free -b'); $i=0; while ( $i != strlen($free) ) {
        i = strlen($free);
        free = str_replace('  ',' ',$free);     
}
$free = str_replace("\n",'',$free);
$freeArray = explode(' ',$free);
$total_free = $freeArray[9] + $freeArray[18];
==========

Does anyone have any ideas that could be used on all OSes? i.e. Without shell_exec()?

Thanks in advance.
-Robin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to