I'm getting the process memory usage with GetProcessMemoryInfo and PROCESS_MEMORY_COUNTERS and i want to compare who have the biggest usage.
I'm trying to use std::<list> to do it creating mine <list> with SIZE_T type.
I add the elements like this:
list<SIZE_T> sizes;
PROCESS_MEMORY_COUNTERS info = { 0 };
info.cb = sizeof(info);
GetProcessMemoryInfo(process, &info, sizeof(info));
sizes.push_back(info.WorkingSetSize);
And to find the biggest:
SIZE_T temp = 0;
for (SIZE_T i = 0; i < sizes.size(); ++i){
if (sizes[i] > temp){
temp = sizes[i];
}
}
or am i using it wrong?
Ty * here don't say that i can't do a SIZE_T ( http://ift.tt/1xvMvWA )
Aucun commentaire:
Enregistrer un commentaire