Re: how do you create a private property as an array in a class
| From: | Derick Rethans | Date: | Sun, 08 Apr 2012 09:26:55 +0000 |
| Subject: | Re: how do you create a private property as an array in a class | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-59454@lists.php.net to get a copy of this message | ||
On Sat, 7 Apr 2012, Matthew Hernandez wrote:
> How can I valgrind my extension? Google isn't bringing up many php
> extension topics :/
On the shell:
export USE_ZEND_ALLOC=0
export ZEND_DONT_UNLOAD_MODULES=1
valgrind php -dextension=yourextension.so yourscript.php
See for some more info here:
http://derickrethans.nl/valgrinding-shared-modules.html
> I can't figure out why I keep getting a seg fault:
>
> typedef struct _foo_object {
> zend_object std;
> zval *elements;
> } foo_object;
>
> static foo_object *foo_object_ptr;
You really want to avoid real globals like this though, as it makes
things not thread-safe.
Also, please don't top-reply on this list.
cheers,
Derick
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug