downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

memory_get_usage> <main
[edit] Last updated: Fri, 17 May 2013

view this page in

memory_get_peak_usage

(PHP 5 >= 5.2.0)

memory_get_peak_usage返回分配给 PHP 内存的峰值

说明

int memory_get_peak_usage ([ bool $real_usage = false ] )

返回分配给你的 PHP 脚本的内存峰值字节数。

参数

real_usage

如果设置为 TRUE 可以获取从系统分配到的真实内存尺寸。 如果未设置,或者设置为 FALSE,仅会报告 emalloc() 使用的内存。

返回值

返回内存峰值的字节数。

更新日志

版本 说明
5.2.1 使用此函数无需在编译时加上 --enable-memory-limit 选项。
5.2.0 添加参数 real_usage

参见



add a note add a note User Contributed Notes memory_get_peak_usage - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites