Lines Matching defs:orig_size
102 static void *HwasanAllocate(StackTrace *stack, uptr orig_size, uptr alignment,
104 if (orig_size > kMaxAllowedMallocSize) {
107 orig_size);
110 ReportAllocationSizeTooBig(orig_size, kMaxAllowedMallocSize, stack);
114 uptr size = TaggedSize(orig_size);
132 meta->requested_size = static_cast<u32>(orig_size);
141 if (size != orig_size) {
142 internal_memcpy(reinterpret_cast<u8 *>(allocated) + orig_size, tail_magic,
143 size - orig_size - 1);
152 if (flags()->tag_in_malloc && malloc_bisect(stack, orig_size)) {
154 uptr tag_size = orig_size ? orig_size : 1;
194 uptr orig_size = meta->requested_size;
199 uptr tagged_size = TaggedSize(orig_size);
200 if (flags()->free_checks_tail_magic && orig_size &&
201 tagged_size != orig_size) {
202 uptr tail_size = tagged_size - orig_size - 1;
205 reinterpret_cast<uptr>(aligned_ptr) + orig_size);
208 orig_size, tail_magic);
218 Min(TaggedSize(orig_size), (uptr)flags()->max_free_fill_size);
223 TagMemoryAligned(reinterpret_cast<uptr>(aligned_ptr), TaggedSize(orig_size),
229 free_context_id, static_cast<u32>(orig_size)});