Changeset 2014 in vbox for trunk/src/VBox/HostDrivers/Support/testcase
- Timestamp:
- Apr 10, 2007 3:56:23 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 20302
- Location:
- trunk/src/VBox/HostDrivers/Support/testcase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp
r1890 r2014 75 75 } 76 76 77 /* useless since SUPContAlloc/SUPContFree use cPages now */78 #if 079 /*80 * 2nd part81 */82 if (!rcRet)83 {84 rc = SUPInit();85 RTPrintf("tstContiguous: SUPInit -> rc=%Vrc\n", rc);86 rcRet += rc != 0;87 if (!rc)88 {89 for (int i = 0; i < 256; i++)90 {91 RTHCPHYS HCPhys = 0;92 void *pv = SUPContAlloc(PAGE_SIZE + 512 + i, &HCPhys);93 rcRet += pv == NULL || HCPhys == 0;94 if (pv && HCPhys)95 {96 memset(pv, 0x7f, PAGE_SIZE + 512 + i);97 rc = SUPContFree(pv);98 rcRet += rc != 0;99 if (rc)100 RTPrintf("tstContiguous: %d: SUPContFree failed! rc=%Vrc\n", i, rc);101 }102 else103 RTPrintf("tstContiguous: %d: SUPContAlloc failed!\n", i);104 }105 106 rc = SUPTerm();107 RTPrintf("tstContiguous: SUPTerm -> rc=%Vrc\n", rc);108 rcRet += rc != 0;109 }110 }111 #endif112 113 77 return rcRet; 114 78 } -
trunk/src/VBox/HostDrivers/Support/testcase/tstPin.cpp
r1890 r2014 54 54 for (unsigned i = 0; i < sizeof(aPinnings) / sizeof(aPinnings[0]); i++) 55 55 { 56 #ifdef __OS2__57 56 aPinnings[i].pv = NULL; 58 57 SUPPageAlloc(0x10000 >> PAGE_SHIFT, &aPinnings[i].pv); 59 #else60 aPinnings[i].pv = malloc(0x10000);61 #endif62 58 aPinnings[i].pvAligned = ALIGNP(aPinnings[i].pv, PAGE_SIZE); 63 59 rc = SUPPageLock(aPinnings[i].pvAligned, 0xf000 >> PAGE_SHIFT, &aPinnings[i].aPages[0]); … … 79 75 RTPrintf("SUPPageLock -> rc=%d\n", rc); 80 76 rcRet++; 81 #ifdef __OS2__82 77 SUPPageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT); 83 #else84 free(aPinnings[i].pv);85 #endif86 78 aPinnings[i].pv = aPinnings[i].pvAligned = NULL; 87 79 break; … … 108 100 { 109 101 memset(aPinnings[i].pv, 0xcc, 0x10000); 110 #ifdef __OS2__111 102 SUPPageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT); 112 #else113 free(aPinnings[i].pv);114 #endif115 103 aPinnings[i].pv = NULL; 116 104 } … … 152 140 #define BIG_SIZE 72*1024*1024 153 141 #define BIG_SIZEPP (BIG_SIZE + PAGE_SIZE) 154 #ifdef __OS2__155 142 pv = NULL; 156 143 SUPPageAlloc(BIG_SIZEPP >> PAGE_SHIFT, &pv); 157 #else158 pv = malloc(BIG_SIZEPP);159 #endif160 144 if (pv) 161 145 { … … 187 171 rcRet++; 188 172 } 189 #ifdef __OS2__190 173 SUPPageFree(pv, BIG_SIZEPP >> PAGE_SHIFT); 191 #else192 free(pv);193 #endif194 174 } 195 175
Note:
See TracChangeset
for help on using the changeset viewer.