On Fri, 18 Oct 2002, Rasmus Lerdorf wrote: > I'm trying to optimize some code for an *extremely* busy site. This site > has a bunch of data in shared memory to make it available across all the > httpd's. I need to provide this data in the form of arrays to user-space > PHP through an extension obviously. Rather trivial to do, but my problem > is that I need to estrndup() this stuff to make PHP happy. This is > slowing me down. If I don't dupe the data then PHP will try to efree() it > which is a no-no since this is an external pointer. > > Instead of a normal array_init(return_value) could I zend_hash_init() my > own hash and still set it to be an array but provide my own DTOR function > which will not free these pointers?
Never mind, I had made a dumb mistake in my test code. This approach does work. -Rasmus -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php