Changeset 76054 in vbox for trunk/src/VBox/HostDrivers/Support/win
- Timestamp:
- Dec 7, 2018 11:47:53 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r75282 r76054 86 86 /** Enables the fast I/O control code path. */ 87 87 #define VBOXDRV_WITH_FAST_IO 88 89 /* Missing if we're compiling against older WDKs. */ 90 #ifndef NonPagedPoolNx 91 # define NonPagedPoolNx ((POOL_TYPE)512) 92 #endif 88 93 89 94 … … 321 326 * Global Variables * 322 327 *********************************************************************************************************************************/ 328 /** The non-paged pool type to use, NonPagedPool or NonPagedPoolNx. */ 329 static POOL_TYPE g_enmNonPagedPoolType = NonPagedPool; 323 330 /** Pointer to the system device instance. */ 324 331 static PDEVICE_OBJECT g_pDevObjSys = NULL; … … 589 596 590 597 /* 598 * Figure out if we can use NonPagedPoolNx or not. 599 */ 600 ULONG ulMajorVersion, ulMinorVersion, ulBuildNumber; 601 PsGetVersion(&ulMajorVersion, &ulMinorVersion, &ulBuildNumber, NULL); 602 if (ulMajorVersion > 6 || (ulMajorVersion == 6 && ulMinorVersion >= 2)) /* >= 6.2 (W8)*/ 603 g_enmNonPagedPoolType = NonPagedPoolNx; 604 605 /* 591 606 * Query options first so any overflows on unpatched machines will do less 592 607 * harm (see MS11-011 / 2393802 / 2011-03-18). … … 596 611 */ 597 612 NTSTATUS rcNt; 598 PWSTR pwszCopy = (PWSTR)ExAllocatePoolWithTag( NonPagedPool, pRegPath->Length + sizeof(WCHAR), 'VBox');613 PWSTR pwszCopy = (PWSTR)ExAllocatePoolWithTag(g_enmNonPagedPoolType, pRegPath->Length + sizeof(WCHAR), 'VBox'); 599 614 if (pwszCopy) 600 615 { … … 1192 1207 { 1193 1208 /* Allocate a buffer and copy all the input into it. */ 1194 PSUPREQHDR pHdr = (PSUPREQHDR)ExAllocatePoolWithTag( NonPagedPool, cbBuf, 'VBox');1209 PSUPREQHDR pHdr = (PSUPREQHDR)ExAllocatePoolWithTag(g_enmNonPagedPoolType, cbBuf, 'VBox'); 1195 1210 if (pHdr) 1196 1211 {
Note:
See TracChangeset
for help on using the changeset viewer.