Skip to content

Commit

Permalink
Clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Dec 15, 2011
1 parent 5c57738 commit e393a5a
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -276,9 +276,9 @@ echo memory_get_usage() - $startMemory, ' bytes';
{% endhighlight %} {% endhighlight %}
It basically does the same thing, [but if you run it][16], you'll notice that it uses "only" 5600640 It basically does the same thing, [but if you run it][16], you'll notice that it uses "only" 5600640
bytes. That's 56 bytes per element and thus much less than the normal 144. This is because a fixed bytes. That's 56 bytes per element and thus much less than the 144 bytes per element a normal array
array doesn't need the bucket structure: So it only requires a zval (48 bytes) and a pointer (8 uses. This is because a fixed array doesn't need the bucket structure: So it only requires one zval
bytes), giving us the observed 56 bytes. (48 bytes) and one pointer (8 bytes) for each element, giving us the observed 56 bytes.
[2]: http://codepad.viper-7.com/pjB3Wm [2]: http://codepad.viper-7.com/pjB3Wm
[3]: http://en.wikipedia.org/wiki/Union_%28computer_science%29 [3]: http://en.wikipedia.org/wiki/Union_%28computer_science%29
Expand Down

0 comments on commit e393a5a

Please sign in to comment.