Le 26 avril 2010 10:22, Antony Dovgal <t...@daylessday.org> a écrit : > On 26.04.2010 12:15, Jérôme Loyet wrote: >> 2010/4/26 Antony Dovgal <t...@daylessday.org>: >>> On 26.04.2010 10:58, Jérôme Loyet wrote: >>>> Le 26 avril 2010 04:02, looyao teng <tly.phpf...@gmail.com> a écrit : >>>>> in linux, read the /proc/self(pid)/status, and the VmRSS(real memory >>>>> usage) >>>>> or VmSize(virtual memory usage) is the the memory usage of the current >>>>> process. >>>> >>>> in fact I was looking of a cleaner way to do it. >>> >>> PECL/memtrack does it already. >>> I still don't get why do you want to duplicate it in FPM? >> >> I think the goal is not the same. PELC/memtrack produce a warning if >> memory is over the soft limit and stops execution if it's over the >> hard limit. > > You can always add another limit and another action.
I see how adding limits but how can a PECL module can do process management (killing) without interfacing with the corresponding SAPI ? > >> Moreover, it checks only the memory allocated by the Zend >> Stack. > > Nope. > >> The goal here is to mesure memory usage after each request and kill >> the process if it's larger than the limit. We don't wan't to limit >> each process but we want to check it's been free'd correctly >> >> It's easy to do when checking the Zend Stack Size (ZSS ?) but it's not >> the same if you want to check also memory allocation which have >> bypassed the ZSS. > > That's why memtrack uses mallinfo(). mallinfo is not present on every system (mac os, *bsd, ...) > > -- > Wbr, > Antony Dovgal > --- > http://pinba.org - realtime statistics for PHP > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php