roundcubemail/program/lib/Roundcube/rcube_utils.php
public static function mem_check($need)
    {
        $mem_limit = parse_bytes(ini_get('memory_limit'));
        $memory    = function_exists('memory_get_usage') ? memory_get_usage() : 16*1024*1024; // safe value: 16MB

        return $mem_limit > 0 && $memory + $need > $mem_limit ? false : true;
    }
public static function mem_check($need)
    {
        $mem_limit = parse_bytes(ini_get('memory_limit'));
        $memory    = function_exists('memory_get_usage') ? memory_get_usage() : 16*1024*1024; // safe value: 16MB

        return $mem_limit > 0 && $memory + $need > $mem_limit ? false : true;
    }
public static function mem_check ( $ need ) { $ mem_limit = parse_bytes ( ini_get ( 'memory_limit' ) ) ; $ memory = function_exists ( 'memory_get_usage' ) ? memory_get_usage ( ) : 16 * 1024 * 1024 ; // safe value: 16MB return $ mem_limit > 0 && $ memory + $ need > $ mem_limit ? false : true ; }
Check if we can process not exceeding memory_limit

@param integer Required amount of memory

@return boolean True if memory won't be exceeded, False otherwise
Check if we can process not exceeding memory_limit