src/gc/windows/gcenv.windows.cpp
uint64_t GCToOSInterface::GetPhysicalMemoryLimit(bool* is_restricted)
{
    if (is_restricted)
        *is_restricted = false;

    size_t restricted_limit = GetRestrictedPhysicalMemoryLimit();
    if (restricted_limit != 0)
    {
        if (is_restricted && !g_UseRestrictedVirtualMemory)
            *is_restricted = true;

        return restricted_limit;
    }

    MEMORYSTATUSEX memStatus;
    GetProcessMemoryLoad(&memStatus);
    assert(memStatus.ullTotalPhys != 0);
    return memStatus.ullTotalPhys;
}
// Get the physical memory that this process can use.
// Return:
//  non zero if it has succeeded, 0 if it has failed
// Remarks:
//  If a process runs with a restricted memory limit, it returns the limit. If there's no limit 
//  specified, it returns amount of actual physical memory.
Get the physical memory that this process can use.
Return:
non zero if it has succeeded, 0 if it has failed
Remarks:
If a process runs with a restricted memory limit, it returns the limit. If there's no limit
specified, it returns amount of actual physical memory.
Get the physical memory that this process can use . Return : non zero if it has succeeded 0 if it has failed Remarks : If a process runs with a restricted memory limit it returns the limit . If there ' s no limit specified it returns amount of actual physical memory .
uint64_t GCToOSInterface::GetPhysicalMemoryLimit(bool* is_restricted)
{
    if (is_restricted)
        *is_restricted = false;
    size_t restricted_limit = GetRestrictedPhysicalMemoryLimit();
    if (restricted_limit != 0)
    {
        if (is_restricted && !g_UseRestrictedVirtualMemory)
            *is_restricted = true;
        return restricted_limit;
    }
    MEMORYSTATUSEX memStatus;
    GetProcessMemoryLoad(&memStatus);
    assert(memStatus.ullTotalPhys != 0);
    return memStatus.ullTotalPhys;
}
uint64_t GCToOSInterface :: GetPhysicalMemoryLimit ( bool * is_restricted ) { if ( is_restricted ) * is_restricted = false ; size_t restricted_limit = GetRestrictedPhysicalMemoryLimit ( ) ; if ( restricted_limit != 0 ) { if ( is_restricted && ! g_UseRestrictedVirtualMemory ) * is_restricted = true ; return restricted_limit ; } MEMORYSTATUSEX memStatus ; GetProcessMemoryLoad ( & memStatus ) ; assert ( memStatus . ullTotalPhys != 0 ) ; return memStatus . ullTotalPhys ; }
Get the physical memory that this process can use.
Get the physical memory that this process can use .