Lines Matching refs:sz
68 static size_t fill_token(void *p, size_t sz) in fill_token() argument
72 return (pi * sz) ^ ((sz ^ 0xea6d) * ((pi << 11) | (pi >> 21))); in fill_token()
80 static void fill_block(void *p, size_t sz) in fill_block() argument
86 size_t tok = fill_token(p, sz); in fill_block()
88 ((size_t *)p)[0] = sz; in fill_block()
90 if (sz >= 2 * sizeof(size_t)) { in fill_block()
94 if (sz > 3*sizeof(size_t)) { in fill_block()
95 ((size_t *)p)[sz / sizeof(size_t) - 1] = tok; in fill_block()
102 size_t sz = ((size_t *)p)[0]; in check_fill() local
103 size_t tok = fill_token(p, sz); in check_fill()
105 zassert_true(sz > 0, ""); in check_fill()
107 if (sz >= 2 * sizeof(size_t)) { in check_fill()
111 if (sz > 3 * sizeof(size_t)) { in check_fill()
112 zassert_true(((size_t *)p)[sz / sizeof(size_t) - 1] == tok, ""); in check_fill()
149 static void log_result(size_t sz, struct z_heap_stress_result *r) in log_result() argument
153 uint32_t avg_pct = (uint32_t)((100ULL * avg + sz / 2) / sz); in log_result()
160 r->total_frees, avg, (int) sz, avg_pct); in log_result()
272 void realloc_fill_block(uint8_t *p, size_t sz) in realloc_fill_block() argument
276 for (int i = 0; i < sz; i++) { in realloc_fill_block()
281 bool realloc_check_block(uint8_t *data, uint8_t *orig, size_t sz) in realloc_check_block() argument
285 for (int i = 0; i < sz; i++) { in realloc_check_block()