开发者

if memory_limit is 128M , then any script will use 128MB RAM?

if i set memory_limit开发者_如何学运维 is 128MB. I run a index.php:

<?php
echo 1;
?>

then this script use 128MB RAM ? I think it is not , but want make sure it.


No it doesn't. 128 MB is just the maximum a script can use, it doesn't necessarily HAVE TO use 128 MB. But it won't be allowed to use anymore than that.


From the docs (emphasis mine):

This sets the maximum amount of memory in bytes that a script is allowed to allocate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜