Ok, I am no C coder and I don't claim to be very smart about low level
parts of PHP. But, IMO, this is bug.
http://bugs.php.net/bug.php?id=36924
I have created a test script that shows the insanity of this bug:
Now, you turn that into a script that is going to loop millions of
times, build
On 03/06/2007 12:34 AM, Brian Moon wrote:
Ok, I am no C coder and I don't claim to be very smart about low level
parts of PHP. But, IMO, this is bug.
http://bugs.php.net/bug.php?id=36924
I have created a test script that shows the insanity of this bug:
Number of iterations | First growth
Antony Dovgal wrote:
Yup, the language stole ~32Kb of your memory and used it to speedup the
allocation of small chunks.
Ok, in my attempt to send a sane looking example, I cleaned up the problem.
The introduction of $x into the string makes the difference.
first growth: 892
second growth:
The introduction of $x into the string makes the difference.
first growth: 892
second growth: 3,955,068
Strange, I get:
first growth: 820
second growth: 56
Which build did you test?
--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED] http://www.zend.com/
--
PHP Internals - PHP
Brian Moon wrote:
> Antony Dovgal wrote:
>> Yup, the language stole ~32Kb of your memory and used it to speedup
>> the allocation of small chunks.
>
> Ok, in my attempt to send a sane looking example, I cleaned up the problem.
>
>
> $str = "This is a medium length string";
>
> $start = memory_
I think what is happening is that the Engine caches small-sized memory
blocks and does not really free them when they are deallocated, even
when they are not referenced anymore. The cache size is limited, so I
don't think you need to be concerned. If you still think it is a big
problem for you,
Rasmus Lerdorf wrote:
I get:
first growth: 704
second growth: 32,264
with current PHP_5_2 checkout. I don't have a 5.1.x handy with memory
limits compiled in.
Starting to think this is more prevelant on Mac OS X. My huge numbers
are coming from 5.2.0, on Mac OS X. On my Linux boxes I am
Brian Moon wrote:
> Rasmus Lerdorf wrote:
>>
>> I get:
>>
>> first growth: 704
>> second growth: 32,264
>>
>> with current PHP_5_2 checkout. I don't have a 5.1.x handy with memory
>> limits compiled in.
>
> Starting to think this is more prevelant on Mac OS X. My huge numbers
> are coming from 5
Starting to think this is more prevelant on Mac OS X. My huge numbers
are coming from 5.2.0, on Mac OS X. On my Linux boxes I am getting
smaller numbers, more like what you guys are reporting so I assume you
are using Linux.
I vaguely remember there was some problem with calculating exact me
On 03/06/2007 02:33 AM, Brian Moon wrote:
Rasmus Lerdorf wrote:
I get:
first growth: 704
second growth: 32,264
with current PHP_5_2 checkout. I don't have a 5.1.x handy with memory
limits compiled in.
Starting to think this is more prevelant on Mac OS X. My huge numbers
are coming from 5
10 matches
Mail list logo