Lines Matching refs:sz
63 void MetaMap::AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz) { in AllocBlock() argument
66 b->siz = sz; in AllocBlock()
78 uptr sz = RoundUpTo(b->siz, kMetaShadowCell); in FreeBlock() local
79 FreeRange(thr, pc, p, sz); in FreeBlock()
80 return sz; in FreeBlock()
83 bool MetaMap::FreeRange(ThreadState *thr, uptr pc, uptr p, uptr sz) { in FreeRange() argument
86 u32 *end = MemToMeta(p + sz); in FreeRange()
122 void MetaMap::ResetRange(ThreadState *thr, uptr pc, uptr p, uptr sz) { in ResetRange() argument
125 if (sz <= 4 * kPageSize) { in ResetRange()
127 FreeRange(thr, pc, p, sz); in ResetRange()
135 sz -= diff; in ResetRange()
137 diff = p + sz - RoundDown(p + sz, kPageSize); in ResetRange()
139 FreeRange(thr, pc, p + sz - diff, diff); in ResetRange()
140 sz -= diff; in ResetRange()
143 CHECK_GT(sz, 0); in ResetRange()
145 CHECK_EQ(sz, RoundUp(sz, kPageSize)); in ResetRange()
147 const uptr sz0 = sz; in ResetRange()
149 while (sz > 0) { in ResetRange()
152 sz -= kPageSize; in ResetRange()
157 while (sz > 0) { in ResetRange()
159 sz -= kPageSize; in ResetRange()
249 void MetaMap::MoveMemory(uptr src, uptr dst, uptr sz) { in MoveMemory() argument
253 CHECK_NE(sz, 0); in MoveMemory()
257 u32 *src_meta_end = MemToMeta(src + sz); in MoveMemory()
260 src_meta = MemToMeta(src + sz) - 1; in MoveMemory()
261 dst_meta = MemToMeta(dst + sz) - 1; in MoveMemory()