/vbox/src/VBox/Runtime/testcase/ |
H A D | tstRTMemSafer.cpp | 44 static void doMemSaferScramble(RTTEST hTest, void *pvBuf, size_t cbAlloc) argument 49 RTRandBytes(pvBuf, cbAlloc); 51 void *pvRef = RTMemDup(pvBuf, cbAlloc); 57 int rc = RTMemSaferScramble(pvBuf, cbAlloc); 60 if (!memcmp(pvRef, pvBuf, cbAlloc)) 62 cbAlloc, pvRef, pvBuf); 68 rc = RTMemSaferUnscramble(pvBuf, cbAlloc); 71 if (memcmp(pvRef, pvBuf, cbAlloc)) 73 cbAlloc, pvRef, pvBuf); 76 RTTestIFailed("Unscrambling %z bytes failed with %Rrc!\n", cbAlloc, r 88 size_t cbAlloc = RTRandS32Ex(1, _1M) * sizeof(uint8_t); local 110 size_t cbAlloc = RTRandS32Ex(1, _16K); local [all...] |
H A D | tstRTMemWipe.cpp | 48 size_t cbAlloc = RTRandS32Ex(1, _1M) * sizeof(uint8_t); local 51 p + 1, cbAlloc); 53 void *pvBuf = RTMemAlloc(cbAlloc); 57 cbAlloc); 60 RTRandBytes(pvBuf, cbAlloc); 62 void *pvWipe = RTMemDup(pvBuf, cbAlloc); 68 cbAlloc); 71 size_t cbWipeRand = RTRandU32Ex(1, cbAlloc); 72 RTMemWipeThoroughly(pvWipe, RT_MIN(cbAlloc, cbWipeRand), p /* Passes */); 73 if (!memcmp(pvWipe, pvBuf, cbAlloc)) [all...] |
/vbox/src/VBox/Runtime/r3/win/ |
H A D | allocex-win.cpp | 43 static int rtMemAllocExInRange(size_t cbAlloc, uint32_t fFlags, void **ppv, uintptr_t uAddr, uintptr_t uAddrLast) argument 57 && MemInfo.RegionSize >= cbAlloc) 59 void *pv = VirtualAlloc((void *)uAddr, cbAlloc, MEM_RESERVE | MEM_COMMIT, fPageProt); 65 AssertStmt(!pv, VirtualFree(pv, cbAlloc, MEM_RELEASE)); 79 DECLHIDDEN(int) rtMemAllocEx16BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv) argument 81 cbAlloc = RT_ALIGN_Z(cbAlloc, PAGE_SIZE); 82 AssertReturn(cbAlloc <= _64K - PAGE_SIZE, VERR_NO_MEMORY); 85 return rtMemAllocExInRange(cbAlloc, fFlags, ppv, PAGE_SIZE, _64K - cbAlloc); 89 rtMemAllocEx32BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv) argument [all...] |
/vbox/src/VBox/Runtime/r3/posix/ |
H A D | allocex-r3-posix.cpp | 43 DECLHIDDEN(int) rtMemAllocEx16BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv) argument 45 AssertReturn(cbAlloc < _64K, VERR_NO_MEMORY); 52 uintptr_t uAddrLast = _64K - uAddr - cbAlloc; 55 void *pv = mmap((void *)uAddr, cbAlloc, fProt, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 64 munmap(pv, cbAlloc); 74 DECLHIDDEN(int) rtMemAllocEx32BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv) 78 void *pv = mmap(NULL, cbAlloc, fProt, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 88 void *pv = mmap(NULL, cbAlloc, fProt, MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
|
/vbox/src/VBox/Runtime/r3/ |
H A D | allocex.h | 55 * @param cbAlloc Number of bytes to allocate (including the 60 DECLHIDDEN(int) rtMemAllocEx16BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv); 66 * @param cbAlloc Number of bytes to allocate (including the 71 DECLHIDDEN(int) rtMemAllocEx32BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv);
|
H A D | test.cpp | 64 size_t cbAlloc; member in struct:RTTESTGUARDEDMEM 577 pMem->cbAlloc = pMem->aGuards[0].cb + pMem->aGuards[1].cb + cbAligned; 578 pMem->pvAlloc = RTMemPageAlloc(pMem->cbAlloc); 618 RTMemPageFree(pMem->pvAlloc, pMem->cbAlloc); 676 RTMemPageFree(pMem->pvAlloc, pMem->cbAlloc);
|
/vbox/src/VBox/Runtime/r3/generic/ |
H A D | allocex-r3-generic.cpp | 41 DECLHIDDEN(int) rtMemAllocEx16BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv) argument 47 DECLHIDDEN(int) rtMemAllocEx32BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv) argument
|
/vbox/src/VBox/Runtime/common/asn1/ |
H A D | asn1-default-allocator.cpp | 68 size_t cbAlloc = rtAsn1DefaultAllocator_AlignSize(cb); local 69 void *pv = RTMemAllocZ(cbAlloc); 73 pAllocation->cbAllocated = (uint32_t)cbAlloc; 86 size_t cbAlloc = rtAsn1DefaultAllocator_AlignSize(cbNew); local 87 void *pv = RTMemRealloc(pvOld, cbAlloc); 91 pAllocation->cbAllocated = (uint32_t)cbAlloc;
|
H A D | asn1-basics.cpp | 191 uint32_t cbAlloc = RT_OFFSETOF(RTASN1MEMCONTENT, au64Content) + (uint32_t)cb; 193 int rc = pAllocator->pfnAlloc(pAllocator, &Allocation, (void **)&pHdr, cbAlloc); 196 Assert(Allocation.cbAllocated >= cbAlloc);
|
/vbox/src/VBox/Additions/darwin/VBoxClient/ |
H A D | VBoxClientClipboardGuestToHost.cpp | 130 uint32_t cbAlloc = 0; local 157 cbAlloc = RT_ALIGN_32(cbData, PAGE_SIZE); 158 pvData = RTMemPageAllocZ(cbAlloc); 176 *pcbAlloc = cbAlloc; 188 static void vbclClipboardReleaseGuestData(void **ppvData, uint32_t cbAlloc) argument 191 RTMemPageFree(*ppvData, cbAlloc); 274 uint32_t cbAlloc = 0; local 289 rc = vbclClipboardReadGuestData(pPasteboard, kUTTypeUTF16PlainText, &pvData, &cbData, &cbAlloc); 299 rc = vbclClipboardReadGuestData(pPasteboard, kUTTypeUTF8PlainText, &pvData, &cbData, &cbAlloc); 319 vbclClipboardReleaseGuestData(&pvData, cbAlloc); [all...] |
/vbox/src/VBox/Storage/testcase/ |
H A D | VDScriptAst.cpp | 311 size_t cbAlloc = 0; local 316 cbAlloc = sizeof(VDSCRIPTASTFN); 319 cbAlloc = sizeof(VDSCRIPTASTFNARG); 322 cbAlloc = sizeof(VDSCRIPTASTDECL); 325 cbAlloc = sizeof(VDSCRIPTASTSTMT); 328 cbAlloc = sizeof(VDSCRIPTASTEXPR); 331 cbAlloc = sizeof(VDSCRIPTASTTYPENAME); 339 PVDSCRIPTASTCORE pAstNode = (PVDSCRIPTASTCORE)RTMemAllocZ(cbAlloc);
|
/vbox/src/VBox/Runtime/common/string/ |
H A D | ministring.cpp | 79 size_t cbAlloc = RT_ALIGN_Z(pThis->m_cbAllocated, IPRT_MINISTRING_APPEND_ALIGNMENT); local 80 cbAlloc += RT_MIN(cbAlloc, _4M); 81 if (cbAlloc <= cchBoth) 82 cbAlloc = RT_ALIGN_Z(cchBoth + 1, IPRT_MINISTRING_APPEND_ALIGNMENT); 83 pThis->reserve(cbAlloc);
|
/vbox/src/VBox/Runtime/r0drv/linux/ |
H A D | alloc-r0drv-linux.c | 162 size_t const cbAlloc = RT_ALIGN_Z(sizeof(RTMEMLNXHDREX) + cb, PAGE_SIZE); local 163 size_t const cPages = cbAlloc >> PAGE_SHIFT; 168 pVmArea = __get_vm_area(cbAlloc, VM_ALLOC, MODULES_VADDR, MODULES_END);
|
/vbox/src/VBox/Main/src-client/ |
H A D | GuestCtrlPrivate.cpp | 662 size_t cbAlloc = m_cbSize + cbData; local 663 cbAlloc = RT_ALIGN_Z(cbAlloc, _64K); 664 void *pvNew = RTMemRealloc(m_pbBuffer, cbAlloc); 668 m_cbAllocated = cbAlloc; 709 LogFlowFunc(("Dumping contents of stream=0x%p (cbAlloc=%u, cbSize=%u, cbOff=%u) to %s\n",
|
H A D | ConsoleVRDPServer.cpp | 2650 uint32_t cbAlloc = p->cbData + pHostChCtx->cbDataReceived; local 2651 pHostChCtx->pvDataReceived = RTMemRealloc(pHostChCtx->pvDataReceived, cbAlloc); 2655 pHostChCtx->cbDataAllocated = cbAlloc;
|
/vbox/src/VBox/GuestHost/HGSMI/ |
H A D | HGSMICommon.cpp | 339 HGSMISIZE cbAlloc = HGSMIBufferRequiredSize (cbData); local 341 HGSMIBUFFERHEADER *pHeader = (HGSMIBUFFERHEADER *)HGSMIHeapBufferAlloc (pHeap, cbAlloc);
|
/vbox/include/VBox/ |
H A D | scsi.h | 230 uint8_t cbAlloc; member in struct:SCSIINQUIRYCDB
|
/vbox/src/VBox/Devices/Storage/ |
H A D | DevAHCI.cpp | 330 size_t cbAlloc; member in struct:AHCIREQ 4351 size_t cbAlloc = pAhciReq->cbTransfer + cSectors * (1 + 11 + 3 + 1 + 288); /* Per sector data like ECC. */ local 4353 pbBuf = (uint8_t *)RTMemAlloc(cbAlloc); 4379 *pcbProc = cbAlloc; 5448 if (pAhciReq->cbAlloc > cb) 5452 else if (pAhciReq->cbAlloc < cb) 5454 if (pAhciReq->cbAlloc) 5455 pAhciPort->pDrvBlock->pfnIoBufFree(pAhciPort->pDrvBlock, pAhciReq->pvAlloc, pAhciReq->cbAlloc); 5458 pAhciReq->cbAlloc = RT_ALIGN_Z(cb, _4K); 5459 int rc = pAhciPort->pDrvBlock->pfnIoBufAlloc(pAhciPort->pDrvBlock, pAhciReq->cbAlloc, [all...] |
H A D | DevLsiLogicSCSI.cpp | 400 size_t cbAlloc; member in struct:LSILOGICREQ 1977 if (pLsiReq->cbAlloc > cb) 1979 else if (pLsiReq->cbAlloc < cb) 1981 if (pLsiReq->cbAlloc) 1982 RTMemPageFree(pLsiReq->pvAlloc, pLsiReq->cbAlloc); 1984 pLsiReq->cbAlloc = RT_ALIGN_Z(cb, _4K); 1985 pLsiReq->pvAlloc = RTMemPageAlloc(pLsiReq->cbAlloc); 1988 pLsiReq->cbAlloc = 0; 2004 RTMemPageFree(pLsiReq->pvAlloc, pLsiReq->cbAlloc); 2005 pLsiReq->cbAlloc [all...] |
/vbox/src/VBox/ValidationKit/utils/TestExecServ/ |
H A D | TestExecService.cpp | 1820 size_t cbAlloc = pStdInBuf->cb + cb; local 1821 cbAlloc = RT_ALIGN_Z(cbAlloc, _64K); 1822 void *pvNew = RTMemRealloc(pStdInBuf->pch, cbAlloc); 1826 pStdInBuf->cbAllocated = cbAlloc;
|
/vbox/src/VBox/VMM/VMMR3/ |
H A D | PGMDbg.cpp | 1120 uint32_t cbAlloc; 1121 rc = MMR3HyperQueryInfoFromHCPhys(pState->pVM, HCPhys, szPage, sizeof(szPage), &cbAlloc); 1123 pState->pHlp->pfnPrintf(pState->pHlp, " %s %#x bytes", szPage, cbAlloc);
|
/vbox/src/VBox/Devices/Graphics/shaderlib/wine/include/wine/ |
H A D | winbase16.h | 131 UINT16 cbAlloc; member in struct:_SEGINFO
|
/vbox/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/ |
H A D | winbase16.h | 131 UINT16 cbAlloc; member in struct:_SEGINFO
|
/vbox/src/VBox/HostDrivers/Support/win/ |
H A D | SUPHardenedVerifyProcess-win.cpp | 1688 SIZE_T cbAlloc = cbFree; local 1689 rcNt = NtAllocateVirtualMemory(hProcess, &pvAlloc, 0, &cbAlloc, MEM_COMMIT, PAGE_READWRITE);
|