Index: /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp	(revision 51917)
+++ /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp	(revision 51918)
@@ -2227,11 +2227,13 @@
      * Note! Attempts at using SystemSessionProcessInformation failed with
      *       STATUS_ACCESS_VIOLATION.
+     * Note! The 32 bytes on the size of to counteract the allocation header
+     *       that rtR0MemAllocEx slaps on everything.
      */
-    ULONG       cbNeeded = _64K;
+    ULONG       cbNeeded = _64K - 32;
     uint32_t    cbBuf;
     uint8_t    *pbBuf = NULL;
     do
     {
-        cbBuf = RT_ALIGN(cbNeeded + _4K, _64K);
+        cbBuf = RT_ALIGN(cbNeeded + _4K, _64K) - 32;
         pbBuf = (uint8_t *)RTMemAlloc(cbBuf);
         if (!pbBuf)
@@ -3296,6 +3298,8 @@
     /*
      * Take a snapshot of all the handles in the system.
+     * Note! The 32 bytes on the size of to counteract the allocation header
+     *       that rtR0MemAllocEx slaps on everything.
      */
-    uint32_t    cbBuf    = _256K;
+    uint32_t    cbBuf    = _256K - 32;
     uint8_t    *pbBuf    = (uint8_t *)RTMemAlloc(cbBuf);
     ULONG       cbNeeded = cbBuf;
@@ -3307,5 +3311,5 @@
                && cbBuf <= 32U*_1M)
         {
-            cbBuf = RT_ALIGN_32(cbNeeded + _4K, _64K);
+            cbBuf = RT_ALIGN_32(cbNeeded + _4K, _64K) - 32;
             RTMemFree(pbBuf);
             pbBuf = (uint8_t *)RTMemAlloc(cbBuf);
@@ -3414,4 +3418,5 @@
     }
 
+    RTMemFree(pbBuf);
     return rc;
 }
