0

I have some issues with memory, I have a process that increases its resident memory too much, I am trying to determinate whether there is a memory leak or not.

Just opening the process, memory occupies 151 Mb

VIRT RES SHR 792m 151m 14m

After a couple of days, the process increases the resident memory too much:

VIRT RES SHR 784m 480m 9204

I have generate two dumps, one opening the process and another after a couple of days, I have generated the dumps like this:

jmap -dump:file=file.bin PID

The first dump occupies 23 Mb, and the second dump 244 Mb.

If I open both dumps with the Memory Analyzer Tool I found that both dumps occupies almost the same ~7Mb: 6.6 Mb for the first one and 7.4 Mb for the second one.

¿Can anyone explain me how this is possible and how can I determinate if it exists a memory leak or not? ¿How can I justify this memory increment?

Thank you very much!!

As an additional info, smaps shows an strange entry that seems to be the guilty:

As an additional info: smaps shows 487a0000-5fbcd000 rwxp 00000000 00:00 0

Size: 381108 kB

Rss: 381108 kB

Pss: 10420 kB

Shared_Clean: 0 kB

Shared_Dirty: 0 kB

Private_Clean: 0 kB

Private_Dirty: 381108 kB

Referenced: 374832 kB

Anonymous: 381108 kB

AnonHugePages: 370688 kB

Swap: 0 kB

KernelPageSize: 4 kB

MMUPageSize: 4 kB

Locked: 0 kB

But I can not understand what it means.

bracana
  • 1,003
  • 2
  • 11
  • 20
  • where exactly are you seeing this value `6.6 MB` for heap dump in MAT ? is it on summary page or some where else ? – Arkantos Feb 08 '15 at 07:29
  • Yes, Is the main page of MAT, the one that shows a diagram. I tried to attach the photo but I am not allowed. Thank you. – bracana Feb 09 '15 at 07:43
  • By default MAT will only show live objects and removes all unreachable objects in overview page. That's why your heap dump size and overview size might vary. If you want to see them as well, goto Preferences --> select keep unreachable objects but this is not guaranteed to work always.. U can give it a try :-) – Arkantos Feb 09 '15 at 19:20

0 Answers0