WP_Background_Process::get_memory_limit()

Get memory limit


Return Return

(int)


Top ↑

Source Source

File: vendor/deliciousbrains/wp-background-processing/classes/wp-background-process.php

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
protected function get_memory_limit() {
    if ( function_exists( 'ini_get' ) ) {
        $memory_limit = ini_get( 'memory_limit' );
    } else {
        // Sensible default.
        $memory_limit = '128M';
    }
 
    if ( ! $memory_limit || - 1 === intval( $memory_limit ) ) {
        // Unlimited, set to 32GB.
        $memory_limit = '32000M';
    }
 
    return wp_convert_hr_to_bytes( $memory_limit );
}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.