Lines Matching defs:sz
59 void MetaMap::AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz) {
62 b->siz = sz;
75 uptr sz = RoundUpTo(b->siz, kMetaShadowCell);
76 FreeRange(proc, p, sz);
77 return sz;
80 bool MetaMap::FreeRange(Processor *proc, uptr p, uptr sz) {
83 u32 *end = MemToMeta(p + sz);
119 void MetaMap::ResetRange(Processor *proc, uptr p, uptr sz) {
123 FreeRange(proc, p, sz);
128 if (sz <= 4 * kPageSize) {
130 FreeRange(proc, p, sz);
138 sz -= diff;
140 diff = p + sz - RoundDown(p + sz, kPageSize);
142 FreeRange(proc, p + sz - diff, diff);
143 sz -= diff;
146 CHECK_GT(sz, 0);
148 CHECK_EQ(sz, RoundUp(sz, kPageSize));
150 const uptr sz0 = sz;
152 for (uptr checked = 0; sz > 0; checked += kPageSize) {
155 sz -= kPageSize;
160 for (uptr checked = 0; sz > 0; checked += kPageSize) {
161 bool has_something = FreeRange(proc, p + sz - kPageSize, kPageSize);
162 sz -= kPageSize;
234 void MetaMap::MoveMemory(uptr src, uptr dst, uptr sz) {
238 CHECK_NE(sz, 0);
242 u32 *src_meta_end = MemToMeta(src + sz);
245 src_meta = MemToMeta(src + sz) - 1;
246 dst_meta = MemToMeta(dst + sz) - 1;