‪TYPO3CMS  ‪main
TYPO3\CMS\Adminpanel\Utility\MemoryUtility Class Reference

Static Public Member Functions

static isMemoryConsumptionTooHigh ()
 

Private Attributes

const MINIMAL_PERCENT_OF_FREE_MEMORY = 0.30
 

Detailed Description

Helper class to keep track of memory consumption in loggers to reduce risk of running out of memory

Definition at line 27 of file MemoryUtility.php.

Member Function Documentation

◆ isMemoryConsumptionTooHigh()

static TYPO3\CMS\Adminpanel\Utility\MemoryUtility::isMemoryConsumptionTooHigh ( )
static

Checks memory usage used in current process - this is no guarantee for not running out of memory but should prevent memory exhaustion due to the admin panel in most cases. The loggers will stop logging once the amount of free memory falls below the threshold (see MINIMAL_PERCENT_OF_FREE_MEMORY const).

Definition at line 37 of file MemoryUtility.php.

Referenced by TYPO3\CMS\Adminpanel\Log\DoctrineSqlLogger\startQuery(), and TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter\writeLog().

Member Data Documentation

◆ MINIMAL_PERCENT_OF_FREE_MEMORY

const TYPO3\CMS\Adminpanel\Utility\MemoryUtility::MINIMAL_PERCENT_OF_FREE_MEMORY = 0.30
private

Definition at line 29 of file MemoryUtility.php.