Changeset 51918 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Jul 8, 2014 3:15:24 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r51907 r51918 2227 2227 * Note! Attempts at using SystemSessionProcessInformation failed with 2228 2228 * STATUS_ACCESS_VIOLATION. 2229 * Note! The 32 bytes on the size of to counteract the allocation header 2230 * that rtR0MemAllocEx slaps on everything. 2229 2231 */ 2230 ULONG cbNeeded = _64K ;2232 ULONG cbNeeded = _64K - 32; 2231 2233 uint32_t cbBuf; 2232 2234 uint8_t *pbBuf = NULL; 2233 2235 do 2234 2236 { 2235 cbBuf = RT_ALIGN(cbNeeded + _4K, _64K) ;2237 cbBuf = RT_ALIGN(cbNeeded + _4K, _64K) - 32; 2236 2238 pbBuf = (uint8_t *)RTMemAlloc(cbBuf); 2237 2239 if (!pbBuf) … … 3296 3298 /* 3297 3299 * Take a snapshot of all the handles in the system. 3300 * Note! The 32 bytes on the size of to counteract the allocation header 3301 * that rtR0MemAllocEx slaps on everything. 3298 3302 */ 3299 uint32_t cbBuf = _256K ;3303 uint32_t cbBuf = _256K - 32; 3300 3304 uint8_t *pbBuf = (uint8_t *)RTMemAlloc(cbBuf); 3301 3305 ULONG cbNeeded = cbBuf; … … 3307 3311 && cbBuf <= 32U*_1M) 3308 3312 { 3309 cbBuf = RT_ALIGN_32(cbNeeded + _4K, _64K) ;3313 cbBuf = RT_ALIGN_32(cbNeeded + _4K, _64K) - 32; 3310 3314 RTMemFree(pbBuf); 3311 3315 pbBuf = (uint8_t *)RTMemAlloc(cbBuf); … … 3414 3418 } 3415 3419 3420 RTMemFree(pbBuf); 3416 3421 return rc; 3417 3422 }
Note:
See TracChangeset
for help on using the changeset viewer.