Changeset 52050 in vbox for trunk/src/VBox/Runtime/common/math
- Timestamp:
- Jul 16, 2014 1:53:24 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95047
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/math/bignum.cpp
r52018 r52050 118 118 Assert(cbNew > cbOld); 119 119 120 void *pvNew = NULL;120 void *pvNew; 121 121 if (pBigNum->fSensitive) 122 { 123 int rc = RTMemSaferReallocZEx(cbOld, pBigNum->pauElements, cbNew, &pvNew, RTMEMSAFER_ALLOC_EX_ALLOW_PAGEABLE_BACKING); 124 Assert(VALID_PTR(pvNew) || RT_FAILURE(rc)); 125 } 122 pvNew = RTMemSaferReallocZ(cbOld, pBigNum->pauElements, cbNew); 126 123 else 127 124 pvNew = RTMemRealloc(pBigNum->pauElements, cbNew); … … 326 323 pBigNum->cAllocated = RT_ALIGN_32(pBigNum->cUsed, 4); 327 324 if (pBigNum->fSensitive) 328 { 329 int rc = RTMemSaferAllocZEx((void **)&pBigNum->pauElements, pBigNum->cAllocated * RTBIGNUM_ELEMENT_SIZE, 330 RTMEMSAFER_ALLOC_EX_ALLOW_PAGEABLE_BACKING); 331 Assert(VALID_PTR(pBigNum->pauElements) || RT_FAILURE(rc)); 332 } 325 pBigNum->pauElements = (RTBIGNUMELEMENT *)RTMemSaferAllocZ(pBigNum->cAllocated * RTBIGNUM_ELEMENT_SIZE); 333 326 else 334 327 pBigNum->pauElements = (RTBIGNUMELEMENT *)RTMemAlloc(pBigNum->cAllocated * RTBIGNUM_ELEMENT_SIZE); … … 464 457 pBigNum->cAllocated = RT_ALIGN_32(pBigNum->cUsed, 4); 465 458 if (pBigNum->fSensitive) 466 { 467 rc = RTMemSaferAllocZEx((void **)&pBigNum->pauElements, pBigNum->cAllocated * RTBIGNUM_ELEMENT_SIZE, 468 RTMEMSAFER_ALLOC_EX_ALLOW_PAGEABLE_BACKING); 469 Assert(VALID_PTR(pBigNum->pauElements) || RT_FAILURE(rc)); 470 } 459 pBigNum->pauElements = (RTBIGNUMELEMENT *)RTMemSaferAllocZ(pBigNum->cAllocated * RTBIGNUM_ELEMENT_SIZE); 471 460 else 472 461 pBigNum->pauElements = (RTBIGNUMELEMENT *)RTMemAlloc(pBigNum->cAllocated * RTBIGNUM_ELEMENT_SIZE);
Note:
See TracChangeset
for help on using the changeset viewer.