Archive for April 2nd, 2008

sizeof(int) = 68

Pankaj Kumar has a slightly disturbing look at memory usage in PHP.
Each element requires a value structure (zval) which takes 16 bytes.
Also requires a hash bucket – which takes 36 bytes. That gives 52 bytes
per value. Memory allocation headers take another 8 bytes*2 – which
gives 68 bytes. Pretty close to what you have.

Posted by Matthew on April 2nd, 2008

Filed under php, programming | No Comments »