Hi Kaz,

I've since run my program using  --tool=massif , and massif correctly
reported all memory:



    MB
265.7^
.#
     |
..:::#
     |
..@:::::#
     |
..:::@:::::#
     |
,:@:::::@:::::#
     |
.::@:@:::::@:::::#
     |
,:::::@:@:::::@:::::#
     |                                               . :
@:::::@:@:::::@:::::#
     |                                            ..@: :
@:::::@:@:::::@:::::#
     |                                         ..:::@: :
@:::::@:@:::::@:::::#
     |                                      ..::::::@: :
@:::::@:@:::::@:::::#
     |                                   ..:::::::::@: :
@:::::@:@:::::@:::::#
     |                                ., :::::::::::@: :
@:::::@:@:::::@:::::#
     |                            ., ::@ :::::::::::@: :
@:::::@:@:::::@:::::#
     |                         ..::@ ::@ :::::::::::@: :
@:::::@:@:::::@:::::#
     |                      ,.:::::@ ::@ :::::::::::@: :
@:::::@:@:::::@:::::#
     |                    .:@::::::@ ::@ :::::::::::@: :
@:::::@:@:::::@:::::#
     |               .. : ::@::::::@ ::@ :::::::::::@: :
@:::::@:@:::::@:::::#
     |            .. :: : ::@::::::@ ::@ :::::::::::@: :
@:::::@:@:::::@:::::#
     |         , ::: :: : ::@::::::@ ::@ :::::::::::@: :
@:::::@:@:::::@:::::#
   0
+----------------------------------------------------------------------->Gi
     0
1.584

Number of snapshots: 83
 Detailed snapshots: [4, 7, 9, 21, 29, 32, 45, 49, 59, 62, 72, 81 (peak)]


----------------------------------------------------------------------------
----
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)
stacks(B)
----------------------------------------------------------------------------
----
 73  1,566,070,529      256,292,664      254,821,441     1,471,223
0
 74  1,581,387,012      259,160,256      257,679,135     1,481,121
0
 75  1,596,703,495      262,027,848      260,536,829     1,491,019
0
 76  1,612,019,978      264,895,440      263,394,523     1,500,917
0
 77  1,627,336,461      267,763,032      266,252,217     1,510,815
0
 78  1,642,652,944      270,630,624      269,109,911     1,520,713
0
 79  1,657,969,427      273,498,216      271,967,605     1,530,611
0
 80  1,673,285,910      276,365,808      274,825,299     1,540,509
0
 81  1,685,522,232      278,653,400      277,104,989     1,548,411
0

....................
----------------------------------------------------------------------------
----
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)
stacks(B)
----------------------------------------------------------------------------
----
 82  1,700,827,952        7,258,056        6,800,229       457,827
0

This probably means that when I kill the program with Ctrl+C, it first
releases most of the memory after the signal is caught, and only then exits,
with a very small memory footprint at the very last moment, which memcheck
correctly reports (corresponding to snapshot 82 in massif).
I wonder if I could see what takes all that memory in snapshots 73-81, since
from my standpoint those are memory leaks. Massif only shows me which line
in Python interpreter code did the allocations, which is too generic- I
would like to know what has actually been allocated. 





> -----Original Message-----
> From: Kaz Kylheku [mailto:[email protected]]
> Sent: Wednesday, February 24, 2010 7:21 PM
> To: Alec Matusis
> Cc: [email protected]
> Subject: Re: [Valgrind-users] Basic question about memcheck
> 
> On Wed, Feb 24, 2010 at 4:00 PM, Alec Matusis <[email protected]>
> wrote:
> > I guess I do not understand something basic here, about the two order of
> > magnitude mismatch between the memory size numbers that the OS sees
> and that
> > valgrind reports at exit.
> 
> Hi Alec,
> 
> It's possible that this is fragmentation, though it's an awful lot of
> fragmentation.
> 
> I wonder whether you are not running into an issue with glibc's malloc.
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=1128


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to