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


_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to