Matt W wrote:
> Hi Dmitry, Ilia, et al.,
>
> Ilia, the Memory Manager is checking the *real* size against memory_limit,
> so it's still "more accurate" even after the functions were changed to
> report more like the old way.  I still wonder how much difference there may
> be between size and real_size as it gets close to the limit...
>
> After the changes, I see the usage difference after adding a variable, for
> example, is slightly different than before, but I understand that's because
> of counting overhead now or such.  The old one just rounded the amount up to
> a multiple of 8, I think...
>
> Something else I'd like to see changed...  Does anyone think
> memory_get_[peak_]usage() should *always* be available, regardless of
> whether memory_limit is actually enabled?  Using the Windows binaries at
> least, I was devastated :-D that they were unavailable for experimenting,
> etc.
>
> I don't see why not -- the function names IMO don't really suggest that
> they're tied to memory_limit and all that's being saved by not having them
> is a little overhead of updating the size/peak variables, right?
>   

The reason is performance. It takes some processing time to keep
accounting of memory usage and people don't using the feature do not
feel like its worth slowing PHP down.

Edin

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to