src/Service/Flow/Emergency.php
protected function checkMemory()
    {
        // We will only check, if we were able to determine a memory limit
        // in the first place.
        if ($this->serverMemoryLimit > 2) {
            $left = $this->serverMemoryLimit - memory_get_usage();
            // Is more left than is configured?
            if ($left < $this->minMemoryLeft) {
                $this->pool->messages->addMessage('emergencyMemory');
                // Show settings to give the dev to repair the situation.
                Krexx::editSettings();
                Krexx::disable();
                static::$allIsOk = false;
                return true;
            }
        }

        return false;
    }
protected function checkMemory()
    {
        // We will only check, if we were able to determine a memory limit
        // in the first place.
        if ($this->serverMemoryLimit > 2) {
            $left = $this->serverMemoryLimit - memory_get_usage();
            // Is more left than is configured?
            if ($left < $this->minMemoryLeft) {
                $this->pool->messages->addMessage('emergencyMemory');
                // Show settings to give the dev to repair the situation.
                Krexx::editSettings();
                Krexx::disable();
                static::$allIsOk = false;
                return true;
            }
        }

        return false;
    }
protected function checkMemory ( ) { // We will only check, if we were able to determine a memory limit // in the first place. if ( $ this -> serverMemoryLimit > 2 ) { $ left = $ this -> serverMemoryLimit - memory_get_usage ( ) ; // Is more left than is configured? if ( $ left < $ this -> minMemoryLeft ) { $ this -> pool -> messages -> addMessage ( 'emergencyMemory' ) ; // Show settings to give the dev to repair the situation. Krexx :: editSettings ( ) ; Krexx :: disable ( ) ; static :: $ allIsOk = false ; return true ; } } return false ; }
Check if we have enough memory left.

@return bool
Boolean to show if we have enough left.
FALSE = all is OK.
TRUE = we have a problem.
Check if we have enough memory left .