`zend_accel_invalidate` is exposed to userland as `opcache_invalidate`
and marks a script as wasted, however, it does not remove that script
from the OPCache.

There is also the `zend_accel_hash_unlink` that actually does that, it's
there since the beginning of time but without a single call to it in the
entire codebase. It actually removes a script from OPCache, yielding the
desired result of freeing up some space without requiring a complete
restart of OPCache.

What are the reasons that this function is not used and not exposed?
What side-effects does it have if we actually selectively remove scripts
from OPCache?

We replaced the `zend_accel_invalidate` call with
`zend_accel_hash_unlink` in the `opcache_invalidate` implementation and
it worked flawlessly. However, it could be that there are some things
that we are simply overlooking.

-- 
Richard "Fleshgrinder" Fussenegger

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to