Re: memory_get_usage with new Memory Manager

From: Date: Fri, 28 Jul 2006 08:38:37 +0000
Subject: Re: memory_get_usage with new Memory Manager
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-25033@lists.php.net to get a copy of this message
Hi Richard, Andi probably stole the idea. ;-P No, I had kinda wondered the same thing... Not about counting memory only when requested, but if there was a fairly quick/simple way for the slack space to be calculated (to get the emalloc()'d size from the real size) without having another variable to update. Again, that wouldn't work for peak usage though. Matt ----- Original Message ----- From: "Richard Quadling" Sent: Friday, July 28, 2006 > That's what I said (more or less)! Have you all got filters on me? > > On 28/07/06, Andi Gutmans <andi@zend.com> wrote: > > I personally think that we should keep the more accurate behavior both > > because it's the most accurate and what most people would expect when > > setting memory limits, and because it does allow us to always enable > > memory-limit code due to the significantly smaller overhead of keeping > > count. > > If some people really feel it's important for debugging purposes to be able > > to tell how much memory has been emalloced() (i.e. how much size PHP has > > requested as opposed to how much memory is being managed), then we could add > > some slow functions that traverse the memory manager and provide that > > information. For debugging purposes that would be sufficient but will not > > clash with us fixing the memory limit to start working much better and more > > efficiently. > > > > Thoughts? > > Andi

« previous php.internals (#25033) next »