De-export test-only helpers via JET_EXTERN / #ifdef JEMALLOC_JET; declare in unit tests, not headers

This commit is contained in:
Slobodan Predolac 2026-06-08 13:26:02 -07:00
parent 6db4d0c468
commit 4de3a4c3d1
46 changed files with 123 additions and 59 deletions

10
test/include/test/hpa.h Normal file
View file

@ -0,0 +1,10 @@
#ifndef TEST_HPA_H
#define TEST_HPA_H
/*
* Static in production builds (JET_EXTERN); exported only for the unit tests
* that share it (hpa_central, psset).
*/
extern bool hpa_hugepage_size_exceeds_limit(void);
#endif /* TEST_HPA_H */

View file

@ -0,0 +1,10 @@
#ifndef TEST_HPDATA_H
#define TEST_HPDATA_H
/*
* Static in production builds (JET_EXTERN); exported only for the unit tests
* that share it (hpdata, psset).
*/
extern void *hpdata_reserve_alloc(hpdata_t *hpdata, size_t sz);
#endif /* TEST_HPDATA_H */

View file

@ -0,0 +1,12 @@
#ifndef TEST_PROF_DATA_H
#define TEST_PROF_DATA_H
/*
* Static in production builds (#ifdef JEMALLOC_JET); exported only for the unit
* tests that share them (prof_reset, prof_accum, prof_active, prof_tctx).
*/
extern size_t prof_tdata_count(void);
extern size_t prof_bt_count(void);
extern void prof_cnt_all(prof_cnt_t *cnt_all);
#endif /* TEST_PROF_DATA_H */