bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] memory leak problem with matrices


From: Sergey Plis
Subject: Re: [Bug-gsl] memory leak problem with matrices
Date: Thu, 20 Sep 2007 15:18:20 -0600
User-agent: Thunderbird 3.0a1pre (X11/2007091903)

Brian Gough wrote:
At Wed, 19 Sep 2007 20:57:33 -0600,
Sergey Plis wrote:
What I see is the following:
When two programs are run in sequence with first having the memory freed before the second even starts, I do not see the memory being reclaimed - the system !!!swaps!!! I believe, swapping is a good sign of trouble here.

Hello,

This is normal behaviour, free() makes memory available for reuse by
the same process, it does not return it to the operating system.  See
the description of the free() function in the "GNU C Library Reference
Manual" for more details -- it is a great resource.

Also, allowing a callback for a different memory allocator can solve the problem. That is I can use something like mmap to allocate memory and always be sure it goes back to the OS.

Thanks!

--
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]