I have an application whose memory is increasing with test cases that I run. This obviously made me believe that there was a memory leak in my application. Therefore, I applied valgrind in my application and, surprisingly, did not find any leaks.
I'm not sure why my process memory is leaking, so I looked at the smaps file of my process and below, if I found interesting
08426000-42f56000 rwxp 00000000 00:00 0 [heap] Size: 961728 kB Rss: 960252 kB Pss: 960252 kB Shared_Clean: 0 kB Shared_Dirty: 0 kB Private_Clean: 0 kB Private_Dirty: 960252 kB Referenced: 960252 kB Anonymous: 960252 kB AnonHugePages: 0 kB Swap: 0 kB KernelPageSize: 4 kB
To make sense with respect to these numbers, I did some research on Private_Dirty memory; most of the articles indicate that it is memory that has not yet been freed because they are expensive.
This seems to indicate that it is just memory freed by the application, but still held back by the OS.
Can someone help me better understand private_dirty? Could this be a sign of a memory leak that I have?
thanks
source share