RE: [PHP-DEV] memory_get_usage with new Memory Manager
| From: | Dmitry Stogov | Date: | Tue, 25 Jul 2006 11:24:54 +0000 |
| Subject: | RE: [PHP-DEV] memory_get_usage with new Memory Manager | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-24963@lists.php.net to get a copy of this message | ||
Good suggestion.
The correspomding C functions (zend_memory_usage()) can be changed in the
same way.
The memory_limit will de checked for real usage only (as now).
Any objections?
Dmitry.
> -----Original Message-----
> From: Ron Korving [mailto:r.korving@xit.nl]
> Sent: Tuesday, July 25, 2006 2:21 PM
> To: internals@lists.php.net
> Subject: Re: [PHP-DEV] memory_get_usage with new Memory Manager
>
>
> Perhaps it'd be a nice alternative to have an optional
> parameter? Having 4
> functions for checking memory usage is quite a lot, isn't it?
>
> I would humbly prefer seeing:
>
> int memory_get_usage([bool realusage])
> int memory_get_peak_usage([bool realusage])
>
> - Ron
>
>
> "Derick Rethans" <derick@php.net> schreef in bericht
> news:Pine.LNX.4.62.0607251122250.5096@localhost...
> > On Tue, 25 Jul 2006, Dmitry Stogov wrote:
> >
> >> > > Right now memory_get[peak_]usage() show the amount of
> REAL memory
> >> > > that PHP (Zend Memory Manager) takes from system.
> >> > >
> >> > > Previous memory manager showed size of emalloc()-ed memory
> >> > > without
> >> > > malloc() overhead. Also it didn't consider internal caches.
> >> > >
> >> > > We need decide which behavior to use before 5.2.0 release.
> >> >
> >> > I would definitely want a more precise memory usage.
> >>
> >> We can revert "allocated_memory" semantic.
> >> This is not a problem.
> >>
> >> > However, we can add the new one as a different function
> (or atleast
> >> > some internal value in AG).
> >> >
> >> > For now, this change breaks some BC with extensions
> (like Xdebug)
> >> > that use AG(allocated_memory).
> >>
> >> Please use new API functions to access them.
> >
> > What are the new functions?
> >
> > Derick
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>