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:
Moe Charm (CI)
2025-11-09 11:50:18 +09:00
parent cf5bdf9c0a
commit 0da9f8cba3
10 changed files with 349 additions and 48 deletions

22
bench_mi_force.c Normal file
View 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;
}