/vbox/src/VBox/Runtime/common/asn1/ |
H A D | asn1-efence-allocator.cpp | 63 void *pvOld, void **ppvNew, size_t cbNew) 66 Assert(cbNew); 67 void *pv = RTMemEfReallocNP(pvOld, cbNew, RTMEM_TAG); 71 pAllocation->cbAllocated = (uint32_t)cbNew; 62 rtAsn1EFenceAllocator_Realloc(PCRTASN1ALLOCATORVTABLE pThis, PRTASN1ALLOCATION pAllocation, void *pvOld, void **ppvNew, size_t cbNew) argument
|
H A D | asn1-default-allocator.cpp | 82 void *pvOld, void **ppvNew, size_t cbNew) 85 Assert(cbNew); 86 size_t cbAlloc = rtAsn1DefaultAllocator_AlignSize(cbNew); 81 rtAsn1DefaultAllocator_Realloc(PCRTASN1ALLOCATORVTABLE pThis, PRTASN1ALLOCATION pAllocation, void *pvOld, void **ppvNew, size_t cbNew) argument
|
H A D | asn1-basics.cpp | 98 size_t cbNew = cNew * cbEntry; 99 if (pAllocation->cbAllocated < cbNew) 110 cbNew += cNew * cbEntry; 113 int rc = pAllocation->pAllocator->pfnRealloc(pAllocation->pAllocator, pAllocation, pvOld, ppvArray, cbNew); 116 Assert(pAllocation->cbAllocated >= cbNew);
|
/vbox/src/VBox/Runtime/testcase/ |
H A D | tstRTMemSafer.cpp | 128 uint32_t cbNew = RTRandS32Ex(1, _16K + (i / 4) * _16K); local 129 RTTESTI_CHECK_RC_OK_RETV(RTMemSaferReallocZEx(cbAlloc, pvBuf, cbNew, &pvBuf, 0)); 131 RTTESTI_CHECK(ASMMemIsAll8(pvBuf, RT_MIN(cbAlloc, cbNew), chFiller) == NULL); 134 memset(pvBuf, chFiller, cbNew); 135 cbAlloc = cbNew;
|
H A D | tstMemAutoPtr.cpp | 116 void *tstMemAutoPtrAllocatorNoZero(void *pvOld, size_t cbNew, const char *pszTag) argument 118 void *pvNew = RTMemReallocTag(pvOld, cbNew, pszTag); 120 memset(pvNew, 0xfe, cbNew);
|
/vbox/src/VBox/Main/src-all/ |
H A D | DisplayPNGUtil.cpp | 44 uint32_t cbNew = pCtx->cbPNG + (uint32_t)cb; local 45 AssertReturnVoidStmt(cbNew > pCtx->cbPNG && cbNew <= _1G, pCtx->rc = VERR_TOO_MUCH_DATA); 46 cbNew = RT_ALIGN_32(cbNew, 4096) + 4096; 48 void *pNew = RTMemRealloc(pCtx->pu8PNG, cbNew); 56 pCtx->cbAllocated = cbNew;
|
/vbox/src/VBox/Runtime/generic/ |
H A D | memsafer-generic.cpp | 162 RTDECL(int) RTMemSaferReallocZExTag(size_t cbOld, void *pvOld, size_t cbNew, void **ppvNew, uint32_t fFlags, const char *pszTag) RT_NO_THROW 171 if (cbNew && cbOld) 181 rc = RTMemSaferAllocZExTag(&pvNew, cbNew, fFlags, pszTag); 184 memcpy(pvNew, pvOld, RT_MIN(cbNew, cbOld)); 193 rc = RTMemSaferAllocZExTag(ppvNew, cbNew, fFlags, pszTag); 217 RTDECL(void *) RTMemSaferReallocZTag(size_t cbOld, void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW 220 int rc = RTMemSaferReallocZExTag(cbOld, pvOld, cbNew, &pvNew, 0 /*fFlags*/, pszTag);
|
H A D | mempool-generic.cpp | 310 RTDECL(void *) RTMemPoolRealloc(RTMEMPOOL hMemPool, void *pvOld, size_t cbNew) RT_NO_THROW 315 if (!cbNew) 322 return RTMemPoolAlloc(hMemPool, cbNew); 340 PRTMEMPOOLENTRY pEntry = (PRTMEMPOOLENTRY)RTMemRealloc(pOldEntry, cbNew + sizeof(*pEntry));
|
/vbox/src/VBox/Runtime/r0drv/ |
H A D | alloc-r0drv.cpp | 180 RTDECL(void *) RTMemReallocTag(void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW 185 if (!cbNew && pvOld) 193 return RTMemAllocTag(cbNew, pszTag); 207 if ( pHdrOld->cb >= cbNew + RTR0MEM_FENCE_EXTRA 208 && pHdrOld->cb - (cbNew + RTR0MEM_FENCE_EXTRA) <= 128) 210 pHdrOld->cbReq = (uint32_t)cbNew; Assert(pHdrOld->cbReq == cbNew); 212 memcpy((uint8_t *)(pHdrOld + 1) + cbNew, &g_abFence[0], RTR0MEM_FENCE_EXTRA); 218 pHdrNew = rtR0MemAlloc(cbNew + RTR0MEM_FENCE_EXTRA, 0); 224 pHdrNew->cbReq = (uint32_t)cbNew; Asser [all...] |
/vbox/src/VBox/Runtime/r3/ |
H A D | memsafer-r3.cpp | 484 static int rtMemSaferReallocSimpler(size_t cbOld, void *pvOld, size_t cbNew, void **ppvNew, uint32_t fFlags, const char *pszTag) argument 487 int rc = RTMemSaferAllocZExTag(&pvNew, cbNew, fFlags, pszTag); 490 memcpy(pvNew, pvOld, RT_MIN(cbNew, cbOld)); 498 RTDECL(int) RTMemSaferReallocZExTag(size_t cbOld, void *pvOld, size_t cbNew, void **ppvNew, uint32_t fFlags, const char *pszTag) RT_NO_THROW 502 if (cbNew && cbOld) 510 if (cbNew > cbOld) 516 if (cbNew <= cbMax) 518 size_t const cbAdded = (cbNew - cbOld); 550 RTMemWipeThoroughly(pbNew + cbNew, cbMove - cbAdded, 3); 559 pThis->cbUser = cbNew; [all...] |
H A D | alloc.cpp | 185 RTDECL(void *) RTMemReallocTag(void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW 188 void *pv = rtR3MemRealloc("Realloc", RTMEMTYPE_RTMEMREALLOC, pvOld, cbNew, pszTag, ASMReturnAddress(), NULL, 0, NULL); 194 size_t cbRealNew = cbNew || !pvRealOld ? cbNew + sizeof(RTMEMTRACKERHDR) : 0; 196 void *pv = RTMemTrackerHdrReallocDone(pvNew, cbNew, pvOld, pszTag); 198 void *pv = realloc(pvOld, cbNew); NOREF(pszTag); 200 AssertMsg(pv || !cbNew, ("realloc(%p, %#zx) failed!!!\n", pvOld, cbNew)); 201 AssertMsg( cbNew < RTMEM_ALIGNMENT 203 || ( (cbNew [all...] |
H A D | alloc-ef.h | 198 RTDECL(void *) rtR3MemRealloc(const char *pszOp, RTMEMTYPE enmType, void *pvOld, size_t cbNew,
|
H A D | alloc-ef.cpp | 346 static void *rtMemReplacementRealloc(void *pvOld, size_t cbNew) argument 354 size_t cbAligned = RTMEM_REPLACMENT_ALIGN(cbNew); 357 return g_pfnOrgRealloc(pvOld, cbNew); 359 return rtMemReplacementMalloc(cbNew); 782 RTDECL(void *) rtR3MemRealloc(const char *pszOp, RTMEMTYPE enmType, void *pvOld, size_t cbNew, argument 789 return rtR3MemAlloc(pszOp, enmType, cbNew, cbNew, pszTag, pvCaller, RT_SRC_POS_ARGS); 790 if (!cbNew) 804 void *pvRet = rtR3MemAlloc(pszOp, enmType, cbNew, cbNew, pszTa [all...] |
/vbox/include/iprt/ |
H A D | heap.h | 115 * @param cbNew The new size of the heap block. If NULL it behaves like RTHeapSimpleFree(). 120 RTDECL(void *) RTHeapSimpleRealloc(RTHEAPSIMPLE Heap, void *pv, size_t cbNew, size_t cbAlignment); 127 * @param cbNew The new size of the heap block. If NULL it behaves like RTHeapSimpleFree(). 132 RTDECL(void *) RTHeapSimpleReallocZ(RTHEAPSIMPLE Heap, void *pv, size_t cbNew, size_t cbAlignment); 263 * @param cbNew The new size of the heap block. If NULL it behaves like 269 RTDECL(void *) RTHeapOffsetRealloc(RTHEAPOFFSET hHeap, void *pv, size_t cbNew, size_t cbAlignment); 278 * @param cbNew The new size of the heap block. If NULL it behaves like 284 RTDECL(void *) RTHeapOffsetReallocZ(RTHEAPOFFSET hHeap, void *pv, size_t cbNew, size_t cbAlignment);
|
H A D | memsafer.h | 163 * @param cbNew The size of the new allocation. 170 RTDECL(int) RTMemSaferReallocZExTag(size_t cbOld, void *pvOld, size_t cbNew, void **ppvNew, uint32_t fFlags, const char *pszTag) RT_NO_THROW; 206 * @param cbNew The size of the new allocation. 209 RTDECL(void *) RTMemSaferReallocZTag(size_t cbOld, void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW;
|
H A D | mempool.h | 115 * @param cbNew The new block size (in bytes). 117 RTDECL(void *) RTMemPoolRealloc(RTMEMPOOL hMemPool, void *pvOld, size_t cbNew) RT_NO_THROW;
|
H A D | mem.h | 277 * @param cbNew The new block size (in bytes). 279 #define RTMemRealloc(pvOld, cbNew) RTMemReallocTag((pvOld), (cbNew), RTMEM_TAG) 287 * @param cbNew The new block size (in bytes). 290 RTDECL(void *) RTMemReallocTag(void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW; 704 * @param cbNew The new block size (in bytes). 707 RTDECL(void *) RTMemEfRealloc(void *pvOld, size_t cbNew, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW; 857 # define RTMemReallocTag(pvOld, cbNew, pszTag) RTMemEfRealloc((pvOld), (cbNew), (pszTag), RT_SRC_POS) 912 RTDECL(void *) RTMemEfReallocNP(void *pvOld, size_t cbNew, cons [all...] |
H A D | vector.h | 333 DECLINLINE(void *) rtvecReallocDefTag(void *pv, size_t cbNew) argument 335 return RTMemRealloc(pv, cbNew);
|
/vbox/src/VBox/HostDrivers/Support/win/ |
H A D | SUPR3HardenedNoCrt-win.cpp | 324 RTDECL(void *) RTMemReallocTag(void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW 327 return RTMemAllocZTag(cbNew, pszTag); 341 pv = RTHeapSimpleRealloc(g_aSupR3HardenedEarlyHeaps[iHeap].hHeap, pvOld, cbNew, 0); 345 SUP_DPRINTF(("Early heap: %p LB %#zx, was %p - realloc\n", pvNew, cbNew, pvOld)); 356 pv = RTMemAllocTag(cbNew, pszTag); 359 memcpy(pv, pvOld, RT_MIN(cbOld, cbNew)); 368 SUP_DPRINTF(("Early heap: %p LB %#zx, was %p %LB %#zx - realloc\n", pv, cbNew, pvOld, cbOld)); 378 pv = RtlReAllocateHeap(hHeap, 0 /*dwFlags*/, pvOld, cbNew); 380 supR3HardenedFatal("RtlReAllocateHeap failed to allocate %zu bytes.\n", cbNew);
|
/vbox/src/VBox/Runtime/common/string/ |
H A D | stringalloc.cpp | 67 RTDECL(int) RTStrReallocTag(char **ppsz, size_t cbNew, const char *pszTag) argument 70 if (!cbNew) 77 char *pszNew = (char *)RTMemReallocTag(pszOld, cbNew, pszTag); 80 pszNew[cbNew - 1] = '\0'; 85 char *pszNew = (char *)RTMemAllocTag(cbNew, pszTag); 89 pszNew[cbNew - 1] = '\0';
|
/vbox/include/iprt/cpp/ |
H A D | mem.h | 61 * @param cbNew The amount of memory to allocate (in bytes). 63 inline void *RTCMemTmpAutoAllocator(void *pvOld, size_t cbNew) RT_NO_THROW 66 return RTMemTmpAlloc(cbNew);
|
/vbox/src/VBox/Additions/WINNT/VBoxTray/ |
H A D | VBoxClipboard.cpp | 301 uint32_t cbNew = 0; local 302 vboxrc = VbglR3ClipboardReadData(pCtx->u32ClientID, u32Format, pMem, cb, &cbNew); 303 LogFlowFunc(("VbglR3ClipboardReadData returned with rc = %Rrc, cb = %d, cbNew = %d\n", vboxrc, cb, cbNew)); 305 if (RT_SUCCESS (vboxrc) && cbNew <= cb) 307 cb = cbNew;
|
/vbox/src/VBox/Debugger/ |
H A D | VBoxDbgConsole.cpp | 530 size_t cbNew = RT_ALIGN_Z(cb + m_cbInputBufAlloc + 1, 128); local 531 void *pv = RTMemRealloc(m_pszInputBuf, cbNew); 538 m_cbInputBufAlloc = cbNew; 690 size_t cbNew = RT_ALIGN_Z(cbBuf + pThis->m_cbOutputBufAlloc + 1, 1024); local 691 void *pv = RTMemRealloc(pThis->m_pszOutputBuf, cbNew); 700 pThis->m_cbOutputBufAlloc = cbNew;
|
/vbox/src/VBox/Devices/USB/ |
H A D | VUSBSniffer.cpp | 283 uint32_t cbNew = pThis->cbBlockCur + cbAdditional; local 284 uint8_t *pbDataNew = (uint8_t *)RTMemRealloc(pThis->pbBlockData, cbNew); 291 pThis->cbBlockCur = cbNew; 292 pThis->cbBlockMax = cbNew;
|
/vbox/src/VBox/VMM/VMMR3/ |
H A D | MMHyper.cpp | 1460 * @param cbNew The required size of the new block. 1468 VMMR3DECL(int) MMR3HyperRealloc(PVM pVM, void *pvOld, size_t cbOld, unsigned uAlignmentNew, MMTAG enmTagNew, size_t cbNew, argument 1472 return MMHyperAlloc(pVM, cbNew, uAlignmentNew, enmTagNew, ppv); 1474 if (!cbNew && pvOld) 1477 if (cbOld == cbNew) 1480 size_t cbData = RT_MIN(cbNew, cbOld); 1492 rc = MMHyperAlloc(pVM, cbNew, uAlignmentNew, enmTagNew, ppv); 1495 Assert(cbData <= cbNew);
|