|
From: Leonardo G. <l.g...@un...> - 2014-05-29 16:51:06
|
Dear all, I'm looking into valgrind + massif, to track down where the massive memory requirements of jackdmp (Jack2) come from. I'm new to its usage and perhaps I miss something regarding memory attribution with the top command, but here's what I face: According to top, jackd takes 216Mb VIRT, 147M RES, 96Mb SH. If I run with valgrind --tool=massif the log I get from massif is a mere 6Mb of memory. Either valgrind is right and I do not know what the top figures are about, either valgrind can't track down all that large memory locked by jack. According to my knowledge jack is used to get slightly less than 100MB, so I guess the second is the most probable answer. FYI: Jack runs with 4 threads, one of which is in a privileged PAM group with unlimited memory locking and realtime (SCHED_FIFO) priority. Maybe massif can't see the thread which allocates most of the memory? Regards Leonardo -- Dr. Leonardo Gabrielli, PhD student A3Lab - Dept. Information Engineering Università Politecnica delle Marche via Brecce Bianche 12, 60131, Ancona, Italy Skype: leonardo.gabrielli Web: a3lab.dii.univpm.it/people/leonardo-gabrielli <http://a3lab.dii.univpm.it/people/leonardo-gabrielli> |
|
From: Maurice v. S. <ma...@bl...> - 2014-05-29 17:44:08
|
Valgrind doesn't track memory allocation through mmap, mremap and brk. You can use massif with the option --pages-as-heap=yes to track those instead of malloc etc. ][ Maurice van Swaaij ][ ----- Original Message ----- | From: "Leonardo Gabrielli" <l.g...@un...> | To: val...@li... | Sent: Thursday, May 29, 2014 12:50:52 PM | Subject: [Valgrind-users] top and massif about jack2 memory usage | Dear all, | I'm looking into valgrind + massif, to track down where the massive | memory requirements of jackdmp (Jack2) come from. | I'm new to its usage and perhaps I miss something regarding memory | attribution with the top command, but here's what I face: | According to top, jackd takes 216Mb VIRT, 147M RES, 96Mb SH. | If I run with valgrind --tool=massif the log I get from massif is a | mere | 6Mb of memory. Either valgrind is right and I do not know what the | top | figures are about, either valgrind can't track down all that large | memory locked by jack. According to my knowledge jack is used to get | slightly less than 100MB, so I guess the second is the most probable | answer. | FYI: Jack runs with 4 threads, one of which is in a privileged PAM | group | with unlimited memory locking and realtime (SCHED_FIFO) priority. | Maybe massif can't see the thread which allocates most of the memory? | Regards | Leonardo | -- | Dr. Leonardo Gabrielli, PhD student | A3Lab - Dept. Information Engineering | Università Politecnica delle Marche | via Brecce Bianche 12, 60131, Ancona, Italy | Skype: leonardo.gabrielli | Web: a3lab.dii.univpm.it/people/leonardo-gabrielli | <http://a3lab.dii.univpm.it/people/leonardo-gabrielli> | ------------------------------------------------------------------------------ | Time is money. Stop wasting it! Get your web API in 5 minutes. | www.restlet.com/download | http://p.sf.net/sfu/restlet | _______________________________________________ | Valgrind-users mailing list | Val...@li... | https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Konstantin T. <an...@ya...> - 2014-06-18 10:05:35
|
29.05.2014, 21:45, "Maurice van Swaaij" <ma...@bl...>: > Valgrind doesn't track memory allocation through mmap, mremap and brk. > > You can use massif with the option --pages-as-heap=yes to track those instead of malloc etc. But this will overestimate used memory because malloc mmaps much more memory than it is really used. Better solution would be to mark such (de)allocations with VALGRIND_MALLOCLIKE_BLOCK and VALGRIND_FREELIKE_BLOCK in code [1] [1] http://valgrind.org/docs/manual/manual-core-adv.html -- Regards, Konstantin |