Fwd: [HipHop] Storing Variant values between request

74 views
Skip to first unread message

Mike Dupont

unread,
Oct 18, 2011, 5:54:42 AM10/18/11
to hiphop-php-dev
Due to sleeping moderators, I forward this message.
----
From: Daniel <dpa...@gmail.com>
Date: Tue, Oct 18, 2011 at 11:47 AM
Subject: [HipHop] Storing Variant values between request

Hi all,

I develop some extensions we need to create/adapt to Hiphop, and in
one of them I need to have a persistent (across multiple requests)
Variant value.
Non-smart allocated values works well, but with smart-allocated vars
like String or Variable it seems the allocated memory for them get
freed at the end of the request. I try to use many different
approaches but none of them works.

Finally I manage to do it by using an RwLockHashTableSharedStore,
which one of the storages which apc extension use for internal
representation.

The thing is that I'm not sure this is the best way to do that, as
well as I using internal classes of HipHop that are subject to change
in the future.  Any help will be greatly appreciated.

Regards and thanks in advance,
Daniel


---------- Forwarded message ----------
From: Daniel <dpa...@gmail.com>
Date: Tue, Oct 18, 2011 at 11:47 AM
Subject: [HipHop] Storing Variant values between request
To: jamesmikedupont <jamesmi...@googlemail.com>


Hi all,

I develop some extensions we need to create/adapt to Hiphop, and in
one of them I need to have a persistent (across multiple requests)
Variant value.
Non-smart allocated values works well, but with smart-allocated vars
like String or Variable it seems the allocated memory for them get
freed at the end of the request. I try to use many different
approaches but none of them works.

Finally I manage to do it by using an RwLockHashTableSharedStore,
which one of the storages which apc extension use for internal
representation.

The thing is that I'm not sure this is the best way to do that, as
well as I using internal classes of HipHop that are subject to change
in the future.  Any help will be greatly appreciated.

Regards and thanks in advance,
Daniel

--
James Michael DuPont
Member of Free Libre Open Source Software Kosova http://flossk.org

Reply all
Reply to author
Forward
0 new messages