Bug #68565 [Opn->Csd]: Counter for wasted memory in Opcache is only int

From: Date: Fri, 15 May 2015 12:11:05 +0000
Subject: Bug #68565 [Opn->Csd]: Counter for wasted memory in Opcache is only int
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192675@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68565&edit=1 ID: 68565 Updated by: cmb@php.net Reported by: kontakt at adrianslowik dot pl Summary: Counter for wasted memory in Opcache is only int -Status: Open +Status: Closed Type: Bug Package: opcache Operating System: Not relevant / Linux Gentoo PHP Version: 5.5.19 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: The PR has been merged into master: <https://github.com/php/php-src/commit/999545258308effa49fde71b7af7fdd991256e3a>. Therefore closing. Previous Comments: ------------------------------------------------------------------------ [2014-12-08 12:01:50] kontakt at adrianslowik dot pl Description: ------------ When I set opcache.memory_consumption to 10240 (10Gb), it is possible to have more than 2Gb of wasted memory. The Wasted memory variable in code is stored in signed int instead of size_t. In fact I end up with negative amount of wasted memory and wasted memory percentage, which is less than default 5% for scheduling the reload. To replicate the problem set the opcache.memory_consumption to high value (3Gb) Use opcache_compile_file and opcache_invalidate in loop with the same file until wasted memory rises above 2Gb php.ini settings: opcache.enable=1 opcache.enable_cli=0 opcache.memory_consumption=10240 opcache.interned_strings_buffer=16 opcache.max_accelerated_files=1048793 opcache.max_wasted_percentage=5 opcache.use_cwd=1 opcache.validate_timestamps=0 opcache.revalidate_freq=2 opcache.revalidate_path=1 opcache.save_comments=1 opcache.load_comments=1 opcache.error_log=/var/log/php-fpm.opcache.log opcache.log_verbosity_level=1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68565&edit=1

« previous php.bugs (#192675) next »