[Top][All Lists]
[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: |
Wed, 19 Sep 2007 20:57:33 -0600 |
User-agent: |
KMail/1.9.6 (enterprise 0.20070907.709405) |
On Wednesday 19 September 2007 08:38:44 pm you wrote:
> When you free it in your program, it is freed, the OS just doesn't
> reclaim it until another program needs it. When the second program
> calls malloc, the OS will reclaim the memory and give it to the second
> program.
Ideally, that how it should be. But what I am saying: I do not see it here.
Have tried 3 kernel versions on 3 different hardware configurations with 3
different distributions (Ubuntu Gutsy, Ubuntu Feisty and Debian stable) even
on a 64 bit machine.
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.
And yes, you're right, valgring shows no leaks - I've tried it.
Additionally, I have tried running gsl program first (allocating and then
deallocating the matrices, but not exiting), then running the simple malloc
code (see previous email). The system swaps, but when I free memory in the
malloc code - it is freed. At the same time, gsl memory is still taken up.
Can you try compiling the code I am providing and seeing if the problem
actually happens on your box?
--
Sergey
Re: [Bug-gsl] memory leak problem with matrices, Sergey Plis, 2007/09/19