Page 1 of 1

memory_get_usage question

Posted: Sat Jan 15, 2011 3:54 pm
by josh
Parameters

real_usage

Set this to TRUE to get the real size of memory allocated from system. If not set or FALSE only the memory used by emalloc() is reported.


What is the difference between emalloc() and what exactly is a "real memory allocation"?

Re: memory_get_usage question

Posted: Sat Jan 15, 2011 6:54 pm
by Benjamin
josh wrote:What is the difference between emalloc() and what exactly is a "real memory allocation"?
It would appear that the real memory allocation is how much was attempted to be allocated vs how much actually was allocated.

http://www.dgp.toronto.edu/~ajr/270/a2/soln/emalloc.c

Re: memory_get_usage question

Posted: Sat Jan 15, 2011 7:21 pm
by Weirdan
It's not the emalloc used in Zend memory manager.