How I can use ini_set("memory_limit","some_number")
in PHP to only set maximum memory limit for that php p开发者_如何学Crocess, not allocate that memory?
I don't think there's a need to prevent allocation of the memory.
Even if the PHP interpreter would start out with a big malloc()
(which I doubt) then still the memory is only really allocated as soon as the process starts using it.
A related phenomenon is called overcommitment, there's a few good topics about it here on SO.
something good to read Memory Management with PHP
http://www.informit.com/articles/article.aspx?p=516587
If you explain more about your situation and what you exactly need, then may be more answers you can expect
精彩评论