VirtualBox

Changeset 4609 in vbox


Ignore:
Timestamp:
Sep 7, 2007 12:24:15 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
24251
Message:

Updates

Location:
trunk/src/VBox/Additions/WINNT/VBoxService
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxService/VBoxService.cpp

    r4594 r4609  
    2727#include <malloc.h>
    2828#include <VBoxGuestInternal.h>
     29#include <iprt/string.h>
    2930
    3031#include "helpers.h"
     
    6465
    6566    vmmdevInitRequest(&pReq->header, VMMDevReq_LogString);
    66     vsprintf(pReq->szString, String, va);
     67    RTStrPrintfV(pReq->szString, sizeof(Buffer)-sizeof(*pReq), String, va);
    6768    OutputDebugStringA(pReq->szString);
    6869    pReq->header.size += strlen(pReq->szString);
  • trunk/src/VBox/Additions/WINNT/VBoxService/VBoxStatistics.cpp

    r4604 r4609  
    143143    GetSystemInfo(&systemInfo);
    144144
     145    memStatus.dwLength = sizeof(memStatus);
    145146    gCtx.pfnGlobalMemoryStatusEx(&memStatus);
    146147
    147148    req.guestStats.u32PageSize          = systemInfo.dwPageSize;
    148149    req.guestStats.u32PhysMemTotal      = (uint32_t)(memStatus.ullTotalPhys / systemInfo.dwPageSize);
    149     dprintf(("memStatus.ullTotalPhys %VX64\n", memStatus.ullTotalPhys));
    150150    req.guestStats.u32PhysMemAvail      = (uint32_t)(memStatus.ullAvailPhys / systemInfo.dwPageSize);
    151151    /* The current size of the committed memory limit, in bytes. This is physical memory plus the size of the page file, minus a small overhead. */
     
    161161        if (gCtx.pfnGetPerformanceInfo(&perfInfo, sizeof(perfInfo)))
    162162        {
    163             dprintf(("PhysicalTotal     %VX64\n", perfInfo.PhysicalTotal));
    164             dprintf(("PhysicalAvailable %VX64\n", perfInfo.PhysicalAvailable));
    165163            req.guestStats.u32Processes         = perfInfo.ProcessCount;
    166164            req.guestStats.u32Threads           = perfInfo.ThreadCount;
     
    205203        uint64_t deltaKernel  = (pProcInfo->KernelTime.QuadPart - gCtx.ullLastCpuLoad_Kernel);
    206204        uint64_t deltaUser    = (pProcInfo->UserTime.QuadPart - gCtx.ullLastCpuLoad_User);
     205        deltaKernel          -= deltaIdle;  /* idle time is added to kernel time */
    207206        uint64_t ullTotalTime = deltaIdle + deltaKernel + deltaUser;
    208207
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