Changeset 72612 in vbox
- Timestamp:
- Jun 19, 2018 12:42:51 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123110
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp
r69111 r72612 59 59 int rc = SUPR3Init(NULL); 60 60 if (RT_SUCCESS(rc)) 61 rc = SUPR3LowAlloc(RT_ELEMENTS(aPages), (void **)&pVM, &pvR0, &aPages[0]); 61 //rc = SUPR3LowAlloc(RT_ELEMENTS(aPages), (void **)&pVM, &pvR0, &aPages[0]); 62 rc = SUPR3PageAllocEx(RT_ELEMENTS(aPages), 0, (void **)&pVM, &pvR0, &aPages[0]); 62 63 if (RT_FAILURE(rc)) 63 64 { 64 65 RTPrintf("Fatal error: SUP Failure! rc=%Rrc\n", rc); 65 return 1;66 return RTEXITCODE_FAILURE; 66 67 } 67 68 memset(pVM, 0, sizeof(*pVM)); /* wtf? */ … … 69 70 pVM->pVMR0 = pvR0; 70 71 71 static UVM s_UVM; 72 PUVM pUVM = &s_UVM; 72 PUVM pUVM = (PUVM)RTMemPageAllocZ(RT_ALIGN_Z(sizeof(*pUVM), PAGE_SIZE)); 73 if (!pUVM) 74 { 75 RTPrintf("Fatal error: RTMEmPageAllocZ failed\n"); 76 return RTEXITCODE_FAILURE; 77 } 78 pUVM->u32Magic = UVM_MAGIC; 73 79 pUVM->pVM = pVM; 74 80 pVM->pUVM = pUVM; … … 244 250 RTLogFlush(NULL); 245 251 #endif 252 SUPR3PageFreeEx(pVM, RT_ELEMENTS(aPages)); 253 RTMemPageFree(pUVM, RT_ALIGN_Z(sizeof(*pUVM), PAGE_SIZE)); 246 254 return 0; 247 255 }
Note:
See TracChangeset
for help on using the changeset viewer.