Lines Matching refs:pageslab
85 * arena, *not* the arena ind of the pageslab allocator.
106 hpdata_t pageslab;
107 hpdata_init(&pageslab, PAGESLAB_ADDR, PAGESLAB_AGE);
124 hpdata_t pageslab;
125 hpdata_init(&pageslab, PAGESLAB_ADDR, PAGESLAB_AGE);
133 test_psset_alloc_new(&psset, &pageslab, &alloc[0], PAGE);
145 /* The pageslab, and thus psset, should now have no allocations. */
157 hpdata_t pageslab;
158 hpdata_init(&pageslab, PAGESLAB_ADDR, PAGESLAB_AGE);
166 test_psset_alloc_new(&psset, &pageslab, &alloc[0], PAGE);
179 expect_ptr_null(ps, "Nonempty pageslab evicted");
196 expect_ptr_null(ps, "Nonempty pageslab evicted");
213 expect_ptr_null(ps, "Nonempty pageslab evicted");
217 * middle of the pageslab. Index 11 should be right before such a hole
222 expect_ptr_null(ps, "Nonempty pageslab evicted");
233 expect_ptr_null(ps, "Nonempty pageslab evicted");
235 expect_ptr_null(ps, "Nonempty pageslab evicted");
249 hpdata_t pageslab;
250 hpdata_init(&pageslab, PAGESLAB_ADDR, PAGESLAB_AGE);
259 test_psset_alloc_new(&psset, &pageslab, &alloc[0], PAGE);
269 expect_ptr_null(ps, "Nonempty pageslab evicted");
272 expect_ptr_eq(&pageslab, ps, "Empty pageslab not evicted.");
283 hpdata_t pageslab[2];
284 hpdata_init(&pageslab[0], PAGESLAB_ADDR, PAGESLAB_AGE);
285 hpdata_init(&pageslab[1],
296 test_psset_alloc_new(&psset, &pageslab[0], &alloc[0][0], PAGE);
298 test_psset_alloc_new(&psset, &pageslab[1], &alloc[1][0], PAGE);
307 assert_ptr_eq(&pageslab[i], edata_ps_get(&alloc[i][j]),
323 expect_ptr_eq(&pageslab[1], edata_ps_get(&alloc[0][0]),
324 "Should have picked the fuller pageslab");
385 hpdata_t pageslab;
386 hpdata_init(&pageslab, PAGESLAB_ADDR, PAGESLAB_AGE);
395 test_psset_alloc_new(&psset, &pageslab, &alloc[0], PAGE);
412 test_psset_alloc_new(&psset, &pageslab, &alloc[0], PAGE);
414 psset_update_begin(&psset, &pageslab);
416 psset_update_end(&psset, &pageslab);
431 init_test_pageslabs(psset_t *psset, hpdata_t *pageslab,
435 hpdata_init(pageslab, (void *)(10 * HUGEPAGE), PAGESLAB_AGE);
437 * This pageslab would be better from an address-first-fit POV, but
445 test_psset_alloc_new(psset, pageslab, &alloc[0], PAGE);
450 expect_ptr_eq(pageslab, edata_ps_get(&alloc[i]),
451 "Allocated from the wrong pageslab");
457 "Allocated from the wrong pageslab");
467 "Allocated from the wrong pageslab");
470 /* Deallocate the last page from the older pageslab. */
481 hpdata_t pageslab;
486 init_test_pageslabs(&psset, &pageslab, &worse_pageslab, alloc,
489 /* The edata should come from the better pageslab. */
494 expect_ptr_eq(&pageslab, edata_ps_get(&test_edata),
495 "Allocated from the wrong pageslab");
505 hpdata_t pageslab;
510 init_test_pageslabs(&psset, &pageslab, &worse_pageslab, alloc,
514 psset_update_begin(&psset, &pageslab);
527 expect_ptr_null(ps, "Incorrect eviction of nonempty pageslab");
528 psset_update_end(&psset, &pageslab);
531 expect_ptr_eq(&pageslab, edata_ps_get(&alloc[HUGEPAGE_PAGES - 1]),
538 pageslab);