Changeset 32813 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Sep 29, 2010 11:50:19 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
r32772 r32813 305 305 uint32_t VBoxServiceBalloonQueryPages(uint32_t cbPage) 306 306 { 307 Assert(cbPage > 0); 307 308 return g_cMemBalloonChunks * (VMMDEV_MEMORY_BALLOON_CHUNK_SIZE / cbPage); 308 309 } -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp
r32772 r32813 266 266 deltaKernel -= deltaIdle; /* idle time is added to kernel time */ 267 267 uint64_t ullTotalTime = deltaIdle + deltaKernel + deltaUser; 268 if (ullTotalTime == 0) /* Prevent division through zero. */ 269 ullTotalTime = 1; 268 270 269 271 req.guestStats.u32CpuLoad_Idle = (uint32_t)(deltaIdle * 100 / ullTotalTime); … … 412 414 + u64DeltaUser 413 415 + u64DeltaNice; 416 if (u64DeltaAll == 0) /* Prevent division through zero. */ 417 u64DeltaAll = 1; 414 418 415 419 gCtx.au64LastCpuLoad_Idle[u32CpuId] = u64Idle; … … 507 511 if (rc != -1) 508 512 { 513 Assert(SysInfo.updates != 0); 509 514 u64PagedTotal = VMInfo.swap_avail / SysInfo.updates; 510 515 } … … 562 567 563 568 uint64_t u64DeltaAll = u64DeltaIdle + u64DeltaSystem + u64DeltaUser; 569 if (u64DeltaAll == 0) /* Prevent division through zero. */ 570 u64DeltaAll = 1; 564 571 565 572 gCtx.au64LastCpuLoad_Idle[cCPUs] = u64Idle;
Note:
See TracChangeset
for help on using the changeset viewer.