VirtualBox

Changeset 14335 in vbox


Ignore:
Timestamp:
Nov 18, 2008 10:18:13 PM (16 years ago)
Author:
vboxsync
Message:

Dirty implementation of HostImpl::MemorySize and HostImpl::MemoryAvailable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostImpl.cpp

    r14283 r14335  
    11891189    AutoWriteLock alock (this);
    11901190    CHECK_READY();
    1191     /** @todo */
    1192     return E_NOTIMPL;
     1191    /* @todo This is an ugly hack. There must be a function in IPRT for that. */
     1192    pm::CollectorHAL *hal = pm::createHAL();
     1193    if (!hal)
     1194        return VERR_INTERNAL_ERROR;
     1195    ULONG tmp;
     1196    int rc = hal->getHostMemoryUsage(size, &tmp, &tmp);
     1197    delete hal;
     1198    return rc;
    11931199}
    11941200
     
    12051211    AutoWriteLock alock (this);
    12061212    CHECK_READY();
    1207     /** @todo */
    1208     return E_NOTIMPL;
     1213    /* @todo This is an ugly hack. There must be a function in IPRT for that. */
     1214    pm::CollectorHAL *hal = pm::createHAL();
     1215    if (!hal)
     1216        return VERR_INTERNAL_ERROR;
     1217    ULONG tmp;
     1218    int rc = hal->getHostMemoryUsage(&tmp, &tmp, available);
     1219    delete hal;
     1220    return rc;
    12091221}
    12101222
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