Changeset 12537 in vbox for trunk/src/VBox/Main
- Timestamp:
- Sep 17, 2008 11:40:47 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/win/PerformanceWin.cpp
r12536 r12537 43 43 #include <iprt/err.h> 44 44 #include <iprt/mp.h> 45 #include <iprt/mem.h> 45 46 46 47 #include <map> … … 193 194 uint64_t uTotalMhz = 0; 194 195 RTCPUID nProcessors = RTMpGetCount(); 195 PPROCESSOR_POWER_INFORMATION ppi = new PROCESSOR_POWER_INFORMATION[nProcessors];196 PPROCESSOR_POWER_INFORMATION ppi = (PPROCESSOR_POWER_INFORMATION)RTMemAllocZ(nProcessors * sizeof(PROCESSOR_POWER_INFORMATION)); 196 197 197 198 if (!ppi) … … 203 204 { 204 205 Log(("CallNtPowerInformation() -> %x\n", ns)); 205 delete ppi;206 RTMemFree(ppi); 206 207 return VERR_INTERNAL_ERROR; 207 208 } … … 212 213 *mhz = (ULONG)(uTotalMhz / nProcessors); 213 214 214 delete ppi;215 RTMemFree(ppi); 215 216 LogFlowThisFunc(("mhz=%u\n", *mhz)); 216 217 LogFlowThisFuncLeave();
Note:
See TracChangeset
for help on using the changeset viewer.