Re: Re: How to create Persistent zval?
On Sun, Jan 19, 2014 at 1:16 AM, Lin Yo-An <[email protected]> wrote:
> Thanks again for the detailed answers and your patience. =]
>
> Just want to make sure the mechanism here:
>
> 1. an object can not be persistent even the object is allocated with
> pemalloc?
> I actually have tried using pemalloc then init an object few days ago,
> and it doesn't work.
>
> 2. an zend object can not be allocated persistently because its property
> HashTable or handlers is not allocated persistently by default?
>
> 3. if so, objects must be serialized to string?
>
> 4. what about array? can I make the array persistent with pemalloc
> allocation and without serialization?
>
>
> Thank you so much
> Yo-An Lin
> http://github.com/c9s
>
>
Sending this message on behalf of Joe as he's having technical difficulties
sending to the list...
----
1) We have no support for a persistent objects store, whatever you put in
the objects store has a request lifecycle.
2) Correct, a zend object cannot be persistent, as 1).
3) Actual objects, in the sense of zend_objects in the object store
(EG(objects_store)), must be serialized.
4) A HashTable, one that is not used as the properties of an object in
EG(objects_store) can be persistent, and doesn't have to be serialized.
https://github.com/krakjoe/apcu/blob/simplify/apc_cache.c#L1164
Above is the function that copies HashTables to shared memory for APC
https://github.com/krakjoe/apcu/blob/simplify/apc_cache.c#L1309
Above is the callback function passed to my_copy_hashtable as copy_fn, note
that only objects are serialized by this code, nothing else.
Cheers
Joe
Thread (14 messages)