I have written one sample code where I allocate memory and then free it. What I observed was whenever allocation was done, VmData is increased. Whenever that memory is accessed (memset or use it), VmRss is increased. When that pointer is freed, both VmData and VmRSS come back to original value.

But I am working on a existing code, where the system memory is constantly increasing. I have used all memory leak tools and am not finding leaks. What my observation is VmRSS is increasing by 4k constantly. When it increases by a few times then only VmData is increases and eventually VmSize.

Can anybody explain why VmRSS is increasing and VmData is not increasing.

I have verified it on Linux - 2.4 kernel