Yep. PHP does clock up memory very quickly for big arrays, objects with lots of
members and/or lots of small objects with large overheads. There are a LOT of
zvals and zobjects and things around the place, and their overhead isn't all that
small.
Of course, if you go to the trouble to construc
That's what I was afraid of. So it does copy the entire array. Crap. :-)
Am I correct that each level in the array represents its own ZVal, with the
additional memory overhead a ZVal has (however many bytes that is)?
That is, the array below would have $a, foo, bar, baz, bob, narf, poink,
poi
It does the whole of $b. It has to, because when you change 'baz', a reference in
'bar' needs to change to point to the newly copied 'baz', so 'bar' is
written...and likewise 'foo' is written.
Ben.
On 19/01/11 5:45 PM, Larry Garfield wrote:
Hi folks. I have a question about the PHP runtime
Hi folks. I have a question about the PHP runtime that I hope is appropriate
for this list. (If not, please thwap me gently; I bruise easily.)
I know PHP does copy-on-write. However, how "deeply" does it copy when
dealing with nested arrays?
This is probably easiest to explain with an exampl
On 19/01/11 3:51 PM, Stas Malyshev wrote:
Hi!
If anything, I would argue that PHP is a language unsuited to beginners (and
other
scripting languages), as it is so flexible it doesn't enforce good programming
practice. Java is much more a 'beginner language' because it has much stricter
Contr
Hi!
like "map" express this well. The idea is that the executor can start
up with no variables in scope, though hopefully shared code segments,
For that you would probably need to put some severe restrictions on your
code, such as:
1. No usage of default properties or statics in classes or
Hi!
If anything, I would argue that PHP is a language unsuited to beginners (and
other
scripting languages), as it is so flexible it doesn't enforce good programming
practice. Java is much more a 'beginner language' because it has much stricter
Contrary to popular belief, people usually don't
Hi!
Yes, I expected the two functions - tsrm_new_interpreter() and
init_executor() to do that, as it is the function called in
php_request_startup() in main/main.c
As far as I remember, you need to run the whole request startup for the
the thread, otherwise there will be unitilialized pieces.
On 19/01/11 10:50, Stefan Marr wrote:
> On 18 Jan 2011, at 22:16, Sam Vilain wrote:
>> there doesn't seem to
>> be an interpreter under the sun which has successfully pulled off
>> threading with shared data.
> Could you explain what you mean with that statement?
>
> Sorry, but that's my topic, and
Strongly second this. PHP is not a toy language restricted to beginners. If it has
advanced features, beginners simply don't need to use them.
If anything, I would argue that PHP is a language unsuited to beginners (and other
scripting languages), as it is so flexible it doesn't enforce good pr
Hello,
I don't think a language becomes a "beginners language" just because many
new programmers use it. And it's still not a good argument for not including
new features.
As long as the new thread doesn't share any memory/variables with the
spawning context, no "reasoning" is required at all. It
Hi!
Sorry, but that's my topic, and the most well know interpreters that
'pulled off' threading with shared data are for Java. The interpreter
Given to what complications Java programmers should go to make their
threaded code work, I have a lot of doubt that 95% of PHP users would be
able to
Hi Sam:
I am following the discussion very interested, but just a question for
clarification:
On 18 Jan 2011, at 22:16, Sam Vilain wrote:
> there doesn't seem to
> be an interpreter under the sun which has successfully pulled off
> threading with shared data.
Could you explain what you mean with
Hi,
I use a multithreaded MPM of apache called "peruser" where we're
hosting a bunch of sites, each with their own virtual host. Each
virtual host needs to be isolated so I'm using chroot and other stuff
to keep them apart. APC was a must as getting good throughput was
important. However, APC woul
On 18/01/11 22:17, Stas Malyshev wrote:
>> 1) any hints or clues from people familiar with the Zend subsystems -
>> such as memory management, and the various stacks, to provide hints as
>> to how to set them up "correctly"
>
> Zend Engine keeps all state (including memory manager state, etc.)
> se
even better would be to report a bug at bugs.php.net and attach the
patch to it :)
Thanks!
On Tue, Jan 18, 2011 at 6:36 PM, Pierre Joye wrote:
> hi,
>
> Yes, I asked you to send me a patch, easier to review and apply.
>
> Cheers,
>
> On Tue, Jan 18, 2011 at 5:09 PM, Sascha Meyer wrote:
>> Good
hi,
Yes, I asked you to send me a patch, easier to review and apply.
Cheers,
On Tue, Jan 18, 2011 at 5:09 PM, Sascha Meyer wrote:
> Good afternoon,
>
> I added a link to the qa/releases/snapshots archives on the PHP for Windows
> downloads page, because older releases of the Windows PHP builds
On Tue, 2011-01-18 at 17:09 +0100, Sascha Meyer wrote:
> Good afternoon,
>
> I added a link to the qa/releases/snapshots archives on the PHP for Windows
> downloads page
[...]
I would love if we could move all that back to php.net, downloads should
use our mirrors for serving users best and givi
Good afternoon,
I added a link to the qa/releases/snapshots archives on the PHP for Windows
downloads page, because older releases of the Windows PHP builds were not
linked on the downloads site. I would also like to improve the functionality of
windows.php.net and do some code restructuring, t
Providing updates to the windows.php.net websites: code cleanup, template
updates, adding links to the download archives, maintenance work
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 14 Jan 2011, Antony Dovgal wrote:
> Are there any objections if I disable E_DEPRECATED notice in dl() for FPM
> SAPI?
> The notice is already disabled for CGI/FastCGI, CLI and Embed SAPIs.
> I believe there's no reason for this notice in case of FPM, too.
IMO, it should be disabled in fa
On Tue, 2011-01-18 at 11:00 +0300, Antony Dovgal wrote:
> On 01/17/2011 09:19 PM, Johannes Schlüter wrote:
> > I think it can be quite dangerous if you have extensions living shorter
> > than the PHP process. Not only might dlclose() cause some leaks but
> > there are a few extensions playing with
Hi!
1) any hints or clues from people familiar with the Zend subsystems -
such as memory management, and the various stacks, to provide hints as
to how to set them up "correctly"
Zend Engine keeps all state (including memory manager state, etc.)
separate in each thread, which means once you'v
On 18/01/11 17:21, Sam Vilain wrote:
> (full code is available at http://github.com/openparallel/php-src.git )
*ahem* that should be http://github.com/openparallel/php-src
In fact to skip straight to the function, try
http://github.com/openparallel/php-src/blob/9205db3/ext/tbb/tbb.c#L208
> http
On 01/17/2011 09:19 PM, Johannes Schlüter wrote:
> I think it can be quite dangerous if you have extensions living shorter
> than the PHP process. Not only might dlclose() cause some leaks but
> there are a few extensions playing with function pointers or opcode
> handlers which aren't properly res
25 matches
Mail list logo