Home  |  Linux  | Mysql  | PHP  | XML
Date:Fri Jul 29 19:30:56 2011
Subject:Re: IS_INTERNED for apc + zend mixtures
On 07/28/2011 11:53 PM, Gopal V wrote:
> 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 hope, you already saw my patch that fixes the problem.
As I explained after the initial interned string patch for PHP and APC I
did additional improvement in PHP, but didn't make corresponding tweak
in APC.

> 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).

it's logically wrong, because you allow the same string to be stored
twice in both regions.

Anyway, please ask me if you are not sure how some new features works.
(I know we don't document ZE internals and it's often very hard to
understand it). I'm not always able to respond immediately and provide
a solution, but I'll try to help. I'll also always glad to hear any
ideas how to make PHP faster (even if I do't accept some of them).

Thanks. Dmitry.

> Cheers,
> Gopal

Navigate in group php.apc.dev at sever news.php.net
Previous Next





  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants