Phase 7 + Pool TLS 1.5b stabilization:\n- Add build hygiene (dep tracking, flag consistency, print-flags)\n- Add build.sh + verify_build.sh (unified recipe, freshness check)\n- Quiet verbose logs behind HAKMEM_DEBUG_VERBOSE\n- A/B free safety via HAKMEM_TINY_SAFE_FREE (mincore strict vs boundary)\n- Tweak Tiny header path to reduce noise; Pool TLS free guard optimized\n- Fix mimalloc link retention (--no-as-needed + force symbol)\n- Add docs/BUILD_PHASE7_POOL_TLS.md (cheatsheet)
This commit is contained in:
22
bench_mi_force.c
Normal file
22
bench_mi_force.c
Normal file
@ -0,0 +1,22 @@
|
||||
// bench_mi_force.c
|
||||
// Force a reference to a mimalloc symbol so the dynamic linker
|
||||
// retains libmimalloc as a NEEDED dependency even with --as-needed.
|
||||
#include <stddef.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
// Declaration; actual signature returns const char* in mimalloc.
|
||||
const char* mi_version(void);
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
// Keep a reachable reference so it isn't optimized out completely.
|
||||
static const void* (*volatile mi_ver_ref)(void) = (const void*(*)(void))mi_version;
|
||||
|
||||
void hakmem_bench_mi_force_link(void) {
|
||||
// Prevent whole-call optimization away
|
||||
(void)mi_ver_ref;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user