Home | History | Annotate | Download | only in unit

Lines Matching defs:ptrs

4 do_fill_test(cache_bin_t *bin, cache_bin_info_t *info, void **ptrs,
13 arr.ptr[i] = &ptrs[i];
23 expect_ptr_eq(ptr, (void *)&ptrs[i],
33 do_flush_test(cache_bin_t *bin, cache_bin_info_t *info, void **ptrs,
39 success = cache_bin_dalloc_easy(bin, &ptrs[i]);
46 expect_ptr_eq(arr.ptr[i], &ptrs[nflush - i - 1], "");
58 do_batch_alloc_test(cache_bin_t *bin, cache_bin_info_t *info, void **ptrs,
64 arr.ptr[i] = &ptrs[i];
74 expect_ptr_eq(out[i], &ptrs[i], "");
127 void **ptrs = mallocx(sizeof(void *) * (ncached_max + 1), 0);
128 assert_ptr_not_null(ptrs, "Unexpected mallocx failure");
131 success = cache_bin_dalloc_easy(&bin, &ptrs[i]);
139 success = cache_bin_dalloc_easy(&bin, &ptrs[ncached_max]);
164 expect_ptr_eq(ptr, &ptrs[ncached_max - i - 1],
181 cache_bin_dalloc_easy(&bin, &ptrs[i]);
186 cache_bin_dalloc_easy(&bin, &ptrs[i]);
197 expect_ptr_eq(ptr, &ptrs[i], "");
212 do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max, ncached_max);
214 do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max,
217 do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max, 0);
220 do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max / 2,
223 do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max / 2,
226 do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max / 2, 0);
228 do_flush_test(&bin, &info, ptrs, ncached_max, ncached_max);
229 do_flush_test(&bin, &info, ptrs, ncached_max, ncached_max / 2);
230 do_flush_test(&bin, &info, ptrs, ncached_max, 0);
231 do_flush_test(&bin, &info, ptrs, ncached_max / 2, ncached_max / 2);
232 do_flush_test(&bin, &info, ptrs, ncached_max / 2, ncached_max / 4);
233 do_flush_test(&bin, &info, ptrs, ncached_max / 2, 0);
235 do_batch_alloc_test(&bin, &info, ptrs, ncached_max, ncached_max);
236 do_batch_alloc_test(&bin, &info, ptrs, ncached_max, ncached_max * 2);
237 do_batch_alloc_test(&bin, &info, ptrs, ncached_max, ncached_max / 2);
238 do_batch_alloc_test(&bin, &info, ptrs, ncached_max, 2);
239 do_batch_alloc_test(&bin, &info, ptrs, ncached_max, 1);
240 do_batch_alloc_test(&bin, &info, ptrs, ncached_max, 0);
241 do_batch_alloc_test(&bin, &info, ptrs, ncached_max / 2,
243 do_batch_alloc_test(&bin, &info, ptrs, ncached_max / 2, ncached_max);
244 do_batch_alloc_test(&bin, &info, ptrs, ncached_max / 2,
246 do_batch_alloc_test(&bin, &info, ptrs, ncached_max / 2, 2);
247 do_batch_alloc_test(&bin, &info, ptrs, ncached_max / 2, 1);
248 do_batch_alloc_test(&bin, &info, ptrs, ncached_max / 2, 0);
249 do_batch_alloc_test(&bin, &info, ptrs, 2, ncached_max);
250 do_batch_alloc_test(&bin, &info, ptrs, 2, 2);
251 do_batch_alloc_test(&bin, &info, ptrs, 2, 1);
252 do_batch_alloc_test(&bin, &info, ptrs, 2, 0);
253 do_batch_alloc_test(&bin, &info, ptrs, 1, 2);
254 do_batch_alloc_test(&bin, &info, ptrs, 1, 1);
255 do_batch_alloc_test(&bin, &info, ptrs, 1, 0);
256 do_batch_alloc_test(&bin, &info, ptrs, 0, 2);
257 do_batch_alloc_test(&bin, &info, ptrs, 0, 1);
258 do_batch_alloc_test(&bin, &info, ptrs, 0, 0);
260 free(ptrs);
265 do_flush_stashed_test(cache_bin_t *bin, cache_bin_info_t *info, void **ptrs,
276 ret = cache_bin_dalloc_easy(bin, &ptrs[i]);
284 ret = cache_bin_stash(bin, &ptrs[i + nfill]);
291 ret = cache_bin_dalloc_easy(bin, &ptrs[0]);
293 ret = cache_bin_stash(bin, &ptrs[0]);
302 expect_true((uintptr_t)ptr < (uintptr_t)&ptrs[nfill],
303 "Should not alloc stashed ptrs");
336 void **ptrs = mallocx(sizeof(void *) * (ncached_max + 1), 0);
337 assert_ptr_not_null(ptrs, "Unexpected mallocx failure");
345 cache_bin_dalloc_easy(&bin, &ptrs[i]);
347 ret = cache_bin_stash(&bin, &ptrs[i]);
352 ret = cache_bin_dalloc_easy(&bin, &ptrs[0]);
354 ret = cache_bin_stash(&bin, &ptrs[0]);
360 uintptr_t diff = ((uintptr_t)ptr - (uintptr_t)&ptrs[0])
371 do_flush_stashed_test(&bin, &info, ptrs, ncached_max, 0);
372 do_flush_stashed_test(&bin, &info, ptrs, 0, ncached_max);
373 do_flush_stashed_test(&bin, &info, ptrs, ncached_max / 2, ncached_max / 2);
374 do_flush_stashed_test(&bin, &info, ptrs, ncached_max / 4, ncached_max / 2);
375 do_flush_stashed_test(&bin, &info, ptrs, ncached_max / 2, ncached_max / 4);
376 do_flush_stashed_test(&bin, &info, ptrs, ncached_max / 4, ncached_max / 4);