Lines Matching refs:Ptr
81 bool AllocatorState::isGuardPage(uintptr_t Ptr) const { in isGuardPage()
82 assert(pointerIsMine(reinterpret_cast<void *>(Ptr))); in isGuardPage()
83 size_t PageOffsetFromPoolStart = (Ptr - GuardedPagePool) / PageSize; in isGuardPage()
88 static size_t addrToSlot(const AllocatorState *State, uintptr_t Ptr) { in addrToSlot() argument
89 size_t ByteOffsetFromPoolStart = Ptr - State->GuardedPagePool; in addrToSlot()
94 size_t AllocatorState::getNearestSlot(uintptr_t Ptr) const { in getNearestSlot()
95 if (Ptr <= GuardedPagePool + PageSize) in getNearestSlot()
97 if (Ptr > GuardedPagePoolEnd - PageSize) in getNearestSlot()
100 if (!isGuardPage(Ptr)) in getNearestSlot()
101 return addrToSlot(this, Ptr); in getNearestSlot()
103 if (Ptr % PageSize <= PageSize / 2) in getNearestSlot()
104 return addrToSlot(this, Ptr - PageSize); // Round down. in getNearestSlot()
105 return addrToSlot(this, Ptr + PageSize); // Round up. in getNearestSlot()