vbox的更動 28271 路徑 trunk/src/VBox/Runtime/r3/alloc.cpp
- 時間撮記:
- 2010-4-13 下午07:29:42 (15 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/alloc.cpp
r24958 r28271 28 28 * additional information or have any questions. 29 29 */ 30 31 32 /******************************************************************************* 33 * Defined Constants And Macros * 34 *******************************************************************************/ 35 #ifdef RTMEM_WRAP_TO_EF_APIS 36 # undef RTMEM_WRAP_TO_EF_APIS 37 # define RTALLOC_USE_EFENCE 1 38 #endif 30 39 31 40 … … 103 112 void *pv = malloc(cb); 104 113 AssertMsg(pv, ("malloc(%#zx) failed!!!\n", cb)); 105 #ifdef RT_OS_OS2 /* temporary workaround until libc062. */106 AssertMsg( cb < 32107 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)), ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT));108 #else109 114 AssertMsg( cb < RTMEM_ALIGNMENT 110 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)), ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT)); 111 #endif 115 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)) 116 || ( (cb & RTMEM_ALIGNMENT) + ((uintptr_t)pv & RTMEM_ALIGNMENT)) == RTMEM_ALIGNMENT 117 , ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT)); 112 118 #endif /* !RTALLOC_USE_EFENCE */ 113 119 return pv; … … 137 143 void *pv = calloc(1, cb); 138 144 AssertMsg(pv, ("calloc(1,%#zx) failed!!!\n", cb)); 139 #ifdef RT_OS_OS2 /* temporary workaround until libc062. */140 AssertMsg( cb < 32141 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)), ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT));142 #else143 145 AssertMsg( cb < RTMEM_ALIGNMENT 144 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)), ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT)); 145 #endif 146 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)) 147 || ( (cb & RTMEM_ALIGNMENT) + ((uintptr_t)pv & RTMEM_ALIGNMENT)) == RTMEM_ALIGNMENT 148 , ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT)); 146 149 #endif /* !RTALLOC_USE_EFENCE */ 147 150 return pv; … … 166 169 void *pv = realloc(pvOld, cbNew); 167 170 AssertMsg(pv && cbNew, ("realloc(%p, %#zx) failed!!!\n", pvOld, cbNew)); 168 #ifdef RT_OS_OS2 /* temporary workaround until libc062. */169 AssertMsg( cbNew < 32170 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)), ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT));171 #else172 171 AssertMsg( cbNew < RTMEM_ALIGNMENT 173 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)), ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT)); 174 #endif 172 || !((uintptr_t)pv & (RTMEM_ALIGNMENT - 1)) 173 || ( (cbNew & RTMEM_ALIGNMENT) + ((uintptr_t)pv & RTMEM_ALIGNMENT)) == RTMEM_ALIGNMENT 174 , ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT)); 175 175 #endif /* !RTALLOC_USE_EFENCE */ 176 176 return pv;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器