Changeset 99460 in vbox
- Timestamp:
- Apr 19, 2023 2:55:55 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/testcase/tstPin.cpp
r99457 r99460 153 153 RTTestISub("Contiguous memory"); 154 154 155 size_t c bAlloc= RT_ALIGN_Z(15003, PAGE_SIZE) >> PAGE_SHIFT;156 157 pv = SUPR3ContAlloc(c bAlloc, NULL, &HCPhys);155 size_t cPages = RT_ALIGN_Z(15003, PAGE_SIZE) >> PAGE_SHIFT; 156 157 pv = SUPR3ContAlloc(cPages, NULL, &HCPhys); 158 158 if (pv && HCPhys) 159 159 { … … 176 176 } 177 177 else 178 RTTestIFailed("SUPR3ContAlloc(%zu bytes) failed!\n", cbAlloc);178 RTTestIFailed("SUPR3ContAlloc(%zu pages) failed!\n", cPages); 179 179 180 180 RTTestISubDone(); … … 187 187 #define BIG_SIZE 72*1024*1024 188 188 #define BIG_SIZEPP (BIG_SIZE + PAGE_SIZE) 189 pv 190 c bAlloc= BIG_SIZEPP >> PAGE_SHIFT;191 rc = SUPR3PageAlloc(c bAlloc, 0, &pv);189 pv = NULL; 190 cPages = BIG_SIZEPP >> PAGE_SHIFT; 191 rc = SUPR3PageAlloc(cPages, 0, &pv); 192 192 if (RT_SUCCESS(rc)) 193 193 { … … 215 215 else 216 216 RTTestIFailed("SUPPageLock(%p) failed with rc=%Rrc\n", pvAligned, rc); 217 SUPR3PageFree(pv, c bAlloc);217 SUPR3PageFree(pv, cPages); 218 218 } 219 219 else 220 RTTestIFailed("SUPPageAlloc(%zu bytes) failed with rc=%Rrc\n", cbAlloc, rc);220 RTTestIFailed("SUPPageAlloc(%zu pages) failed with rc=%Rrc\n", cPages, rc); 221 221 222 222 RTTestISubDone();
Note:
See TracChangeset
for help on using the changeset viewer.