/vbox/include/iprt/ |
H A D | param.h | 37 /* Undefine PAGE_SIZE and PAGE_SHIFT to avoid unnecessary noice when clashing 40 #undef PAGE_SIZE macro 50 # define PAGE_SIZE 8192 macro 52 # define PAGE_SIZE 4096 macro
|
H A D | zero.h | 42 extern RTDATADECL(uint8_t const) g_abRTZeroPage[PAGE_SIZE];
|
/vbox/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ipf/machine/ |
H A D | vmparam.h | 92 #define PAGE_SIZE (1 << PAGE_SHIFT) macro 93 #define PAGE_MASK (PAGE_SIZE - 1) 98 #define VM_GATEWAY_SIZE PAGE_SIZE 111 #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
|
/vbox/src/VBox/Runtime/r3/ |
H A D | memsafer-r3.cpp | 258 RTRandBytes(pvPages, PAGE_SIZE + pThis->offUser); 260 uint8_t *pbUser = (uint8_t *)pvPages + PAGE_SIZE + pThis->offUser; 264 RTRandBytes(pbUser + pThis->cbUser, (size_t)pThis->cPages * PAGE_SIZE - PAGE_SIZE - pThis->offUser - pThis->cbUser); 300 rc = SUPR3PageProtect(pvPages, NIL_RTR0PTR, 0, PAGE_SIZE, RTMEM_PROT_NONE); 303 rc = SUPR3PageProtect(pvPages, NIL_RTR0PTR, (pThis->cPages - 1) * PAGE_SIZE, PAGE_SIZE, RTMEM_PROT_NONE); 306 SUPR3PageProtect(pvPages, NIL_RTR0PTR, 0, PAGE_SIZE, RTMEM_PROT_READ | RTMEM_PROT_WRITE); 335 void *pvPages = RTMemPageAlloc((size_t)pThis->cPages * PAGE_SIZE); 343 rc = RTMemProtect(pvPages, PAGE_SIZE, RTMEM_PROT_NON [all...] |
/vbox/src/VBox/Runtime/testcase/ |
H A D | tstRTR0MemUserKernel.cpp | 72 uint8_t *pbKrnlBuf = (uint8_t *)RTMemAlloc(PAGE_SIZE * 2); 93 int rc = RTR0MemUserCopyFrom(pbKrnlBuf, R3Ptr, PAGE_SIZE); 96 rc = RTR0MemUserCopyTo(R3Ptr, pbKrnlBuf, PAGE_SIZE); 157 for (unsigned cb = 0; cb < PAGE_SIZE - 16; cb++) 165 for (unsigned cb = 0; cb < PAGE_SIZE - 16; cb++) 176 for (unsigned cb = 0; cb < PAGE_SIZE - 16; cb++)
|
/vbox/src/VBox/Additions/common/VBoxService/ |
H A D | VBoxServiceBalloon.cpp | 65 void *pv = (void*)mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 68 g_fSysMadviseWorks = madvise(pv, PAGE_SIZE, MADV_DONTFORK) == 0; 69 munmap(pv, PAGE_SIZE); 86 cb += 2 * PAGE_SIZE; 109 RTMemProtect(pu8, PAGE_SIZE, RTMEM_PROT_NONE); 110 RTMemProtect(pu8 + cb - PAGE_SIZE, PAGE_SIZE, RTMEM_PROT_NONE); 111 pu8 += PAGE_SIZE; 139 cb += 2 * PAGE_SIZE; 140 pu8 -= PAGE_SIZE; [all...] |
/vbox/src/VBox/HostDrivers/Support/testcase/ |
H A D | tstLow.cpp | 78 memset((char *)pvPages0 + iPage * PAGE_SIZE, iPage, PAGE_SIZE); 80 for (uint8_t *pu8 = (uint8_t *)pvPages0 + iPage * PAGE_SIZE, *pu8End = pu8 + PAGE_SIZE; pu8 < pu8End; pu8++) 126 memset((char *)pvPages1 + iPage * PAGE_SIZE, iPage, PAGE_SIZE); 128 for (uint8_t *pu8 = (uint8_t *)pvPages1 + iPage * PAGE_SIZE, *pu8End = pu8 + PAGE_SIZE; pu8 < pu8End; pu8++)
|
H A D | tstContiguous.cpp | 58 memset(pv, 0xff, PAGE_SIZE * 8); 63 memset(pv, 0x7f, PAGE_SIZE * 5);
|
H A D | tstPage.cpp | 52 memset(pv, 0xff, PAGE_SIZE);
|
H A D | tstPin.cpp | 86 aPinnings[i].pvAligned = RT_ALIGN_P(aPinnings[i].pv, PAGE_SIZE); 139 pv = SUPR3ContAlloc(RT_ALIGN_Z(15003, PAGE_SIZE) >> PAGE_SHIFT, NIL_RTR0PTR, &HCPhys); 146 pv = SUPR3ContAlloc(RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT, NIL_RTR0PTR, &HCPhys); 152 rc = SUPR3ContFree(pv, RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT); 169 #define BIG_SIZEPP (BIG_SIZE + PAGE_SIZE) 175 void *pvAligned = RT_ALIGN_P(pv, PAGE_SIZE);
|
/vbox/include/VBox/ |
H A D | param.h | 41 #define VBOX_MAX_ALLOC_PAGE_COUNT (256U * _1M / PAGE_SIZE) 67 #define MM_HYPER_DYNAMIC_SIZE (16U * PAGE_SIZE)
|
/vbox/src/VBox/Runtime/r3/win/ |
H A D | alloc-win.cpp | 60 cbProt = RT_ALIGN_Z(cbProt, PAGE_SIZE); 83 void *pv = VirtualAlloc(NULL, RT_ALIGN_Z(cb, PAGE_SIZE), MEM_COMMIT, PAGE_READWRITE); 85 void *pv = _aligned_malloc(RT_ALIGN_Z(cb, PAGE_SIZE), PAGE_SIZE); 95 void *pv = VirtualAlloc(NULL, RT_ALIGN_Z(cb, PAGE_SIZE), MEM_COMMIT, PAGE_READWRITE); 97 void *pv = _aligned_malloc(RT_ALIGN_Z(cb, PAGE_SIZE), PAGE_SIZE); 101 memset(pv, 0, RT_ALIGN_Z(cb, PAGE_SIZE));
|
H A D | allocex-win.cpp | 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); 91 cbAlloc = RT_ALIGN_Z(cbAlloc, PAGE_SIZE);
|
/vbox/src/VBox/VMM/testcase/ |
H A D | tstCompressionBenchmark.cpp | 44 static size_t g_cPages = 20*_1M / PAGE_SIZE; 165 size_t const cPages = cbSrc / PAGE_SIZE; 169 RTCrc32(&pabSrc[iPage * PAGE_SIZE], PAGE_SIZE); 177 RTCrc64(&pabSrc[iPage * PAGE_SIZE], PAGE_SIZE); 184 RTCrcAdler32(&pabSrc[iPage * PAGE_SIZE], PAGE_SIZE); 192 RTMd5(&pabSrc[iPage * PAGE_SIZE], PAGE_SIZE, abMd5Has [all...] |
H A D | tstSSM.cpp | 59 const uint8_t gabPage[PAGE_SIZE] = {0}; 92 memset(&gabBigMem[sizeof(gabBigMem) / 4], 0, PAGE_SIZE * 4); 93 memset(&gabBigMem[sizeof(gabBigMem) / 4 * 3], 0, PAGE_SIZE * 4); 435 rc = SSMR3PutMem(pSSM, pu8Org, PAGE_SIZE); 438 RTPrintf("Item03: PutMem(,%p,%#x) -> %Rrc\n", pu8Org, PAGE_SIZE, rc); 443 cb -= PAGE_SIZE; 444 pu8Org += PAGE_SIZE; 494 char achPage[PAGE_SIZE]; 495 rc = SSMR3GetMem(pSSM, &achPage[0], PAGE_SIZE); 498 RTPrintf("Item03: SSMR3GetMem(,,%#x) -> %Rrc offset %#x\n", PAGE_SIZE, r [all...] |
H A D | tstMMHyperHeap.cpp | 56 SUPPAGE aPages[RT_ALIGN_Z(sizeof(*pVM) + NUM_CPUS * sizeof(VMCPU), PAGE_SIZE) >> PAGE_SHIFT]; 126 { PAGE_SIZE, PAGE_SIZE, NULL, 13 }, 128 { PAGE_SIZE, 32, NULL, 11 }, 129 { PAGE_SIZE, PAGE_SIZE, NULL, 14 }, 167 || aOps[i].uAlignment == PAGE_SIZE) 211 if (aOps[j].uAlignment == PAGE_SIZE)
|
/vbox/include/VBox/vmm/ |
H A D | uvm.h | 164 AssertMsgReturn( RT_VALID_ALIGNED_PTR(a_pUVM, PAGE_SIZE) \ 167 RT_VALID_ALIGNED_PTR(a_pUVM, PAGE_SIZE) ? (a_pUVM)->u32Magic : 0), \ 173 AssertMsgReturnVoid( RT_VALID_ALIGNED_PTR(a_pUVM, PAGE_SIZE) \ 176 RT_VALID_ALIGNED_PTR(a_pUVM, PAGE_SIZE) ? (a_pUVM)->u32Magic : 0))
|
/vbox/src/VBox/VMM/VMMR0/ |
H A D | VMMR0TripleFaultHack.cpp | 77 int rc = RTR0MemObjEnterPhys(&g_hMemPage0, 0, PAGE_SIZE, RTMEM_CACHE_POLICY_DONT_CARE); 87 //rc = RTR0MemObjAllocPhys(&g_hMemLowCore, PAGE_SIZE, _1M - 1); 89 rc = RTR0MemObjEnterPhys(&g_hMemLowCore, 0x7000, PAGE_SIZE, RTMEM_CACHE_POLICY_DONT_CARE); 100 g_pvSavedLowCore = RTMemAlloc(PAGE_SIZE); 102 memcpy(g_pvSavedLowCore, g_pbLowCore, PAGE_SIZE); 111 AssertLogRelReturn(cbCode <= PAGE_SIZE, VERR_OUT_OF_RANGE); 159 memcpy(g_pbLowCore, g_pvSavedLowCore, PAGE_SIZE);
|
/vbox/src/VBox/HostDrivers/Support/linux/ |
H A D | SUPLib-linux.cpp | 89 void *pv = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 92 pThis->fSysMadviseWorks = (0 == madvise(pv, PAGE_SIZE, MADV_DONTFORK)); 93 munmap(pv, PAGE_SIZE); 242 mprotect(pvPages, PAGE_SIZE, PROT_NONE); 243 mprotect(pvPages + cbMmap - PAGE_SIZE, PAGE_SIZE, PROT_NONE); 244 *ppvPages = pvPages + PAGE_SIZE;
|
/vbox/src/VBox/Runtime/r0drv/darwin/ |
H A D | alloc-r0drv-darwin.cpp | 138 cb = RT_ALIGN_Z(cb, PAGE_SIZE); 140 void *pv = IOMallocContiguous(cb, PAGE_SIZE, &PhysAddr); 168 cb = RT_ALIGN_Z(cb, PAGE_SIZE);
|
H A D | memobj-r0drv-darwin.cpp | 88 if (cb <= PAGE_SIZE) 90 cb -= PAGE_SIZE; 91 pu32 += PAGE_SIZE / sizeof(uint32_t); 114 if (cb <= PAGE_SIZE) 116 cb -= PAGE_SIZE; 117 pu32 += PAGE_SIZE / sizeof(uint32_t); 224 IOAddressRange aRanges[1] = { { (mach_vm_address_t)HCPhys, RT_ALIGN_Z(cb, PAGE_SIZE) } }; 460 cbFudged += PAGE_SIZE; 470 uint64_t uAlignment = PAGE_SIZE; 498 for (IOByteCount off = 0; off < cb; off += PAGE_SIZE) [all...] |
/vbox/src/VBox/Runtime/r0drv/ |
H A D | memobj-r0drv.cpp | 66 AssertMsg(RT_ALIGN_Z(cb, PAGE_SIZE) == cb, ("%#zx\n", cb)); 231 * employed by any API is PAGE_SIZE, so the result can safely be shifted by 249 AssertMsg(RT_ALIGN_Z(pMem->cb, PAGE_SIZE) == pMem->cb, ("%#zx\n", pMem->cb)); 297 return pMem->u.Cont.Phys + iPage * PAGE_SIZE; 299 return pMem->u.Phys.PhysBase + iPage * PAGE_SIZE; 423 const size_t cbAligned = RT_ALIGN_Z(cb, PAGE_SIZE); 439 const size_t cbAligned = RT_ALIGN_Z(cb, PAGE_SIZE); 455 const size_t cbAligned = RT_ALIGN_Z(cb, PAGE_SIZE); 472 const size_t cbAligned = RT_ALIGN_Z(cb + (R3Ptr & PAGE_OFFSET_MASK), PAGE_SIZE); 493 const size_t cbAligned = RT_ALIGN_Z(cb + ((uintptr_t)pv & PAGE_OFFSET_MASK), PAGE_SIZE); [all...] |
/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); 277 cb <= PAGE_SIZE*16 - sizeof(*pHdr) 279 cb <= PAGE_SIZE 289 && cb > PAGE_SIZE 379 * rounded up to PAGE_SIZE. 396 cb = RT_ALIGN_Z(cb, PAGE_SIZE); 422 AssertMsg( (uintptr_t)phys_to_virt(page_to_phys(&paPages[iPage])) + PAGE_SIZE 424 && page_to_phys(&paPages[iPage]) + PAGE_SIZE 465 cb = RT_ALIGN_Z(cb, PAGE_SIZE);
|
/vbox/src/VBox/Runtime/r3/posix/ |
H A D | rtmempage-exec-mmap-posix.cpp | 64 cb = RT_ALIGN_Z(cb, PAGE_SIZE); 101 cb = RT_ALIGN_Z(cb, PAGE_SIZE);
|
/vbox/src/VBox/VMM/VMMR3/ |
H A D | MMHyper.cpp | 130 cbHyperHeap = RT_ALIGN_32(cbHyperHeap, PAGE_SIZE); 145 MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL); 152 rc = MMR3HyperMapPages(pVM, pVM, pVM->pVMR0, RT_ALIGN_Z(pVM->cbSelf, PAGE_SIZE) >> PAGE_SHIFT, pVM->paVMPagesR3, "VM", 161 MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL); 247 rc = PGMMap(pVM, GCPtr + (i << PAGE_SHIFT), paHCPhysPages[i], PAGE_SIZE, 0); 261 for (uint32_t off = 0; off < cb; off += PAGE_SIZE) 267 rc = PGMMap(pVM, GCPtr + off, HCPhys, PAGE_SIZE, 0); 277 for (RTGCPHYS offCur = pLookup->u.MMIO2.off; offCur < offEnd; offCur += PAGE_SIZE) 283 rc = PGMMap(pVM, GCPtr + (offCur - pLookup->u.MMIO2.off), HCPhys, PAGE_SIZE, 0); 426 AssertReturn(RT_ALIGN_P(pvR3, PAGE_SIZE) [all...] |