VirtualBox

Changeset 11180 in vbox for trunk/src/VBox/Main/win


Ignore:
Timestamp:
Aug 6, 2008 3:34:11 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
34200
Message:

PerfAPI: replaced unsigned long with ULONG to get rid of solaris 64-bit issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/win/PerformanceWin.cpp

    r10868 r11180  
    3636    ~CollectorWin();
    3737
    38     virtual int getHostCpuLoad(unsigned long *user, unsigned long *kernel, unsigned long *idle);
    39     virtual int getHostCpuMHz(unsigned long *mhz);
    40     virtual int getHostMemoryUsage(unsigned long *total, unsigned long *used, unsigned long *available);
    41     virtual int getProcessCpuLoad(RTPROCESS process, unsigned long *user, unsigned long *kernel);
    42     virtual int getProcessMemoryUsage(RTPROCESS process, unsigned long *used);
     38    virtual int getHostCpuLoad(ULONG *user, ULONG *kernel, ULONG *idle);
     39    virtual int getHostCpuMHz(ULONG *mhz);
     40    virtual int getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available);
     41    virtual int getProcessCpuLoad(RTPROCESS process, ULONG *user, ULONG *kernel);
     42    virtual int getProcessMemoryUsage(RTPROCESS process, ULONG *used);
    4343
    4444    virtual int getRawHostCpuLoad(uint64_t *user, uint64_t *kernel, uint64_t *idle);
     
    261261}
    262262
    263 int CollectorWin::getHostCpuLoad(unsigned long *user, unsigned long *kernel, unsigned long *idle)
     263int CollectorWin::getHostCpuLoad(ULONG *user, ULONG *kernel, ULONG *idle)
    264264{
    265265    return VERR_NOT_IMPLEMENTED;
     
    334334}
    335335
    336 int CollectorWin::getHostCpuMHz(unsigned long *mhz)
     336int CollectorWin::getHostCpuMHz(ULONG *mhz)
    337337{
    338338    return VERR_NOT_IMPLEMENTED;
    339339}
    340340
    341 int CollectorWin::getHostMemoryUsage(unsigned long *total, unsigned long *used, unsigned long *available)
     341int CollectorWin::getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available)
    342342{
    343343    MEMORYSTATUSEX mstat;
     
    346346    if (GlobalMemoryStatusEx(&mstat))
    347347    {
    348         *total = (unsigned long)( mstat.ullTotalPhys / 1000 );
    349         *available = (unsigned long)( mstat.ullAvailPhys / 1000 );
     348        *total = (ULONG)( mstat.ullTotalPhys / 1000 );
     349        *available = (ULONG)( mstat.ullAvailPhys / 1000 );
    350350        *used = *total - *available;
    351351    }
     
    356356}
    357357
    358 int CollectorWin::getProcessCpuLoad(RTPROCESS process, unsigned long *user, unsigned long *kernel)
     358int CollectorWin::getProcessCpuLoad(RTPROCESS process, ULONG *user, ULONG *kernel)
    359359{
    360360    return VERR_NOT_IMPLEMENTED;
     
    430430}
    431431
    432 int CollectorWin::getProcessMemoryUsage(RTPROCESS process, unsigned long *used)
     432int CollectorWin::getProcessMemoryUsage(RTPROCESS process, ULONG *used)
    433433{
    434434    HRESULT hr;
     
    472472                return VERR_INTERNAL_ERROR;
    473473            }
    474             *used = (unsigned long)(u64used / 1024);
     474            *used = (ULONG)(u64used / 1024);
    475475            rc = VINF_SUCCESS;
    476476        }
Note: See TracChangeset for help on using the changeset viewer.

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