Lines Matching refs:OldPtr
491 void *reallocate(void *OldPtr, uptr NewSize) { in reallocate()
495 if (UNLIKELY(GuardedAlloc.pointerIsMine(OldPtr))) { in reallocate()
496 size_t OldSize = GuardedAlloc.getSize(OldPtr); in reallocate()
499 memcpy(NewPtr, OldPtr, (NewSize < OldSize) ? NewSize : OldSize); in reallocate()
500 GuardedAlloc.deallocate(OldPtr); in reallocate()
505 if (UNLIKELY(!Chunk::isAligned(OldPtr))) in reallocate()
507 OldPtr); in reallocate()
509 Chunk::loadHeader(OldPtr, &OldHeader); in reallocate()
512 OldPtr); in reallocate()
516 "%p\n", OldPtr); in reallocate()
518 const uptr UsableSize = Chunk::getUsableSize(OldPtr, &OldHeader); in reallocate()
526 Chunk::compareExchangeHeader(OldPtr, &NewHeader, &OldHeader); in reallocate()
527 return OldPtr; in reallocate()
535 memcpy(NewPtr, OldPtr, Min(NewSize, UsableSize)); in reallocate()
536 quarantineOrDeallocateChunk(OldPtr, &OldHeader, OldSize); in reallocate()