xfree leaking memory?

Christopher Faylor cgf@redhat.com
Tue Nov 5 18:25:00 GMT 2002


On Tue, Nov 05, 2002 at 05:00:55PM -0500, Harold L Hunt II wrote:
>It was mentioned that the memory size increased when a new X window 
>(such as an xterm) is opened, but that it does not decrease when that 
>window is destroyed.  This indicates one of a few things to me:
>
>1) We are not freeing our window privates (directly or indirectly). 
>This seems plausible, but I don't think our window privates are even 1 
>kilobyte.

I thought I should point out that Cygwin doesn't currently return deallocated
memory to the windows pool.  So, the heap only gets larger.

It does reuse previously allocated memory, of course.  So, a
malloc/free/malloc will not necessarily consume any more system memory.

So, if the memory size grows every time an xterm is opened but then
does not get any larger if subsequent xterms are closed and opened,
then that is probably expected behavior.

cgf



More information about the Cygwin-xfree mailing list