Re: [PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Rasmus Lerdorf
$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

Re: [PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Jon Anderson
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,

[PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Cabbar Duzayak
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'