I have wited a Class ProcReader for generation of the memory snapshot of a process in linux. The ProcReader read the information from /proc/[pid]/status and then generate the memory snapshot for this process. I want test this class. So i write the followed code.
ShowMemSnapShot();
unsigned char* pDynArray = NULL;
pDynArray = new unsigned char[2048];
ShowMemSnapShot();
pDynArray[0] = 1;
delete [] pDynArray;
ShowMemSnapShot();
Problem:
The VmPeak and VmSize in \proc[pid]\status have no change. I don't understand this. Why?