Re: IS_INTERNED for apc + zend mixtures
[email protected] (Gopal V) Thu, 28 Jul 2011 12:53:14 -0700
| Newsgroups | php.apc.dev |
|---|---|
| Message-ID | <[email protected]> |
On Thursday 28 July 2011 12:48 AM, Dmitry Stogov wrote: > O+ uses single SHM memory block to keep all the interned strings. I like the simplicity of the IS_INTERNED check. It's simple & it's fast. > It overrides CG(interned_strings_start) and CG(interned_strings_end) > with SHM memory block boundaries. It also overrides > zend_new_interned_string, zend_interned_strings_snapshot and > zend_interned_strings_restore with dummy functions so PHP doesn't create > interned strings itself. The issue I faced was with strings which would be interned *before* apc MINIT. So once apc overrides the CG(interned_strings_start), the old strings are double-free'd. I'm guessing that it's fixed by ensuring memory cleanup order instead of ensuring IS_INTERNED() checks both blocks (apc and the zend one). Cheers, Gopal