On Thu, 12 Sep 2002, Aaron Bannert wrote:

> On Fri, Sep 13, 2002 at 12:35:19AM +0200, Sascha Schumann wrote:
> >     Incorrect, you can pass negative values to sbrk (malloc
> >     implementations use this seldomly) or allocators call munmap
> >     to give pages back to the operating system.  Either way, it
> >     is possible that memory usage decreases.
>
> I was not aware of this, but as far as I know APR does not take
> advantage of this and so will never show a decrease in mem usage,
> correct?

    Since APR relies on the system's allocator, it might make
    implicit use of aforementioned functionality.  You never know
    what these operations do behind your back.

    When you closely monitor an application's memory usage, you
    will only rarely notice an actual decrease.  Because of
    allocation patterns, memory is quickly fragmented, so that it
    is often impossible to free whole pages (operating systems
    usually account for nothing less).

    - Sascha

Reply via email to