VirtualBox

Changeset 33503 in vbox for trunk/src


Ignore:
Timestamp:
Oct 27, 2010 1:12:57 PM (14 years ago)
Author:
vboxsync
Message:

RTSystemQueryAvailableRam is a better name

Location:
trunk/src/VBox/Runtime/r3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/RTSystemQueryTotalRam-posix.cpp

    r33499 r33503  
    4444    return VERR_NOT_IMPLEMENTED;
    4545}
     46
     47RTDECL(int) RTSystemQueryAvailableRam(uint64_t *pcb)
     48{
     49    AssertPtrReturn(pcb, VERR_INVALID_POINTER);
     50    return VERR_NOT_IMPLEMENTED;
     51}
  • trunk/src/VBox/Runtime/r3/win/RTSystemQueryTotalRam-win.cpp

    r33498 r33503  
    3838
    3939
     40RTDECL(int) RTSystemQueryTotalRam(uint64_t *pcb)
     41{
     42    MEMORYSTATUSEX MemStatus;
     43
     44    AssertPtrReturn(pcb, VERR_INVALID_POINTER);
     45
     46    MemStatus.dwLength = sizeof(MemStatus);
     47    if (!GlobalMemoryStatusEx(&MemStatus))
     48        return RTErrConvertFromWin32(GetLastError());
     49
     50    *pcb = MemStatus.ullTotalPhys;
     51    return VINF_SUCCESS;
     52}
    4053
    4154
    42 RTDECL(int) RTSystemQueryTotalRam(uint64_t *pcb)
     55RTDECL(int) RTSystemQueryAvailableRam(uint64_t *pcb)
    4356{
    4457    MEMORYSTATUSEX MemStatus;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette