On 04.07.2018 at 01:16, Jan Ehrhardt wrote:
> Another one: some extensioms suffer from the fact that the macro GC_G
> was removed from
> https://github.com/php/php-src/blob/master/Zend/zend_gc.h
> Some of the removed functionality has been reintroduced in gc_status
> https://github.com/php/php-src/commits/master/Zend/zend_gc.h
>
> Examples using GC_G: v8js, xdebug, tideways.
> v8js was using gc_active to check if garbage collection was running.
> I did a wild guess to fix it:
> https://github.com/Jan-E/v8js/commit/997df065d3cd06a9b11e399458c391eb797a850e#diff-dc446a69201ccda44a33d111152f6c8c
This looks wrong, since zend_gc_collect_cycles() actually triggers the
GC, if I'm not mistaken.
It seems to me that should be something like:
zend_gc_status status;
zend_gc_get_status(&status);
if (status.runs) {
> Are the changes to zend_gc.h documneted?
Apparently not. The relevant commit is baa9890[1].
[1]
<http://git.php.net/?p=php-src.git;a=commit;h=baa9890112a863f10e62bbb4c5a1623642a5db3c>
--
Christoph M. Becker
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php