$str is 10 bytes
then you repeat it 200 times
That gives you 2000 bytes. That's 20M not 10M
-Rasmus
Cabbar Duzayak wrote:
> Hi,
>
> I have written a simple test program to see how php allocates memory.
> Test code allocates ~10 Meg of RAM in an array within a loop till it
> runs out of
Cabbar Duzayak wrote:
Hi,
I have written a simple test program to see how php allocates memory.
Test code allocates ~10 Meg of RAM in an array within a loop till it
runs out of memory as:
$str = rand(65, 95) . rand(65, 95) . rand(65, 95) . rand(65, 95) .
rand(65, 95);
$aa[] = str_repeat($str,
Hi,
I have written a simple test program to see how php allocates memory.
Test code allocates ~10 Meg of RAM in an array within a loop till it
runs out of memory as:
$str = rand(65, 95) . rand(65, 95) . rand(65, 95) . rand(65, 95) .
rand(65, 95);
$aa[] = str_repeat($str, 200);
What I don'
3 matches
Mail list logo