Remove dead pai_t field and delete pai.h

After replacing PAI vtable dispatch with direct calls in the previous
commit, the embedded pai_t member in pac_t and hpa_shard_t is dead
weight, and pai.h has no remaining users. Remove them.

Changes:
- Drop pai_t pai member (and "must be first member" comment) from
  pac_t and hpa_shard_t.
- Replace #include "jemalloc/internal/pai.h" with the actually-needed
  edata.h / tsd_types.h in pac.h, hpa.h, sec.h, pa.h.
- Update extent_pai_t comment in edata.h to no longer reference pai.h.
- Update three remaining test files (hpa_thp_always,
  hpa_vectorized_madvise, hpa_vectorized_madvise_large_batch) to call
  hpa_*(tsdn, shard, ...) directly instead of pai_*(tsdn, &shard->pai,
  ...).
- Delete include/jemalloc/internal/pai.h.

No behavioral changes.
This commit is contained in:
guangli-dai 2026-04-20 17:24:21 -07:00 committed by Guangli Dai
parent 1dfa6f7aa4
commit 8edd101286
7 changed files with 10 additions and 86 deletions

View file

@ -238,8 +238,7 @@ TEST_BEGIN(test_purge_more_than_one_batch_pages) {
}
for (int i = 0; i < HPA_PURGE_BATCH_MAX * 2 * (int)HUGEPAGE_PAGES;
i++) {
hpa_dalloc(tsdn, shard, edatas[i],
&deferred_work_generated);
hpa_dalloc(tsdn, shard, edatas[i], &deferred_work_generated);
}
hpa_shard_do_deferred_work(tsdn, shard);