Lines Matching defs:OldPtr
483 void *reallocate(void *OldPtr, uptr NewSize, uptr Alignment = MinAlignment) {
494 DCHECK_NE(OldPtr, nullptr);
498 if (UNLIKELY(GuardedAlloc.pointerIsMine(OldPtr))) {
499 uptr OldSize = GuardedAlloc.getSize(OldPtr);
502 memcpy(NewPtr, OldPtr, (NewSize < OldSize) ? NewSize : OldSize);
503 GuardedAlloc.deallocate(OldPtr);
512 void *OldTaggedPtr = OldPtr;
513 OldPtr = getHeaderTaggedPointer(OldPtr);
515 if (UNLIKELY(!isAligned(reinterpret_cast<uptr>(OldPtr), MinAlignment)))
516 reportMisalignedPointer(AllocatorAction::Reallocating, OldPtr);
519 Chunk::loadHeader(Cookie, OldPtr, &Header);
522 reportInvalidChunkState(AllocatorAction::Reallocating, OldPtr);
529 reportDeallocTypeMismatch(AllocatorAction::Reallocating, OldPtr,
570 Chunk::storeHeader(Cookie, OldPtr, &Header);
576 storePrimaryAllocationStackMaybe(Options, OldPtr);
578 storeSecondaryAllocationStackMaybe(Options, OldPtr, NewSize);
1371 void resizeTaggedChunk(uptr OldPtr, uptr NewPtr, uptr NewSize,
1373 uptr RoundOldPtr = roundUp(OldPtr, archMemoryTagGranuleSize());
1382 // to the pointer tag stored in OldPtr.