If the real_usage argument is set to true the PHP DOCS say it will get the real size of memory allocated from system. If it\'s false
as per PHP memory_get_usage
real_usage
Set this to TRUE to get total memory allocated from system, including unused pages. If not set or FALSE only the used memory is reported.
so to get the memory used by your script you should use memory_get_usage() as default real_usage is false.
if you want to get the memory allocated by the system but don't care how much was actually used, use memory_get_usage(true);