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;
    }