FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Exhaustive memory allocation using arrays
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Exhaustive memory allocation using arrays [message #181744] Wed, 29 May 2013 06:27 Go to previous message
tombert.at is currently offline  tombert.at
Messages: 3
Registered: May 2013
Karma:
Junior Member
Why is the following code using > 100MB?

for ($i=0; $i < 1000000; $i++) {
$value[$i] = 23.4567890123;
}
echo (memory_get_usage(TRUE) / (1024 * 1024)) . "MB <br>";

It looks like that each item takes 100 Byte for allocation??

thx for your help!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Parsing mbox files with Windows Php
Next Topic: UML
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 05:34:43 GMT 2024

Total time taken to generate the page: 0.04620 seconds