Exemplo n.º 1
0
int ProcessInfo::getResidentSize() {
    PROCESS_MEMORY_COUNTERS pmc;
    BOOL status = GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc));
    if (!status) {
        DWORD gle = GetLastError();
        error() << "GetProcessMemoryInfo failed with " << errnoWithDescription(gle);
        fassert(28622, status);
    }

    return _wconvertmtos(pmc.WorkingSetSize);
}
Exemplo n.º 2
0
 int ProcessInfo::getResidentSize() {
     PROCESS_MEMORY_COUNTERS pmc;
     verify( GetProcessMemoryInfo( GetCurrentProcess() , &pmc, sizeof(pmc) ) );
     return _wconvertmtos( pmc.WorkingSetSize );
 }