WP_Background_Process::memory_exceeded()
Memory exceeded
Description Description
Ensures the batch process never exceeds 90% of the maximum WordPress memory.
Return Return
(bool)
Source Source
File: vendor/deliciousbrains/wp-background-processing/classes/wp-background-process.php
protected function memory_exceeded() { $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory $current_memory = memory_get_usage( true ); $return = false; if ( $current_memory >= $memory_limit ) { $return = true; } return apply_filters( $this->identifier . '_memory_exceeded', $return ); }
Expand full source code Collapse full source code View on GitHub