Infrastructure and build updates

- Update build configuration and flags
- Add missing header files and dependencies
- Update TLS list implementation with proper scoping
- Fix various compilation warnings and issues
- Update debug ring and tiny allocation infrastructure
- Update benchmark results documentation

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
Moe Charm (CI)
2025-11-11 21:49:05 +09:00
parent 79c74e72da
commit 862e8ea7db
34 changed files with 541 additions and 214 deletions

View File

@ -149,12 +149,8 @@ static void tiny_tls_cache_drain(int class_idx) {
g_tls_sll_head[class_idx] = NULL;
g_tls_sll_count[class_idx] = 0;
while (sll) {
#if HAKMEM_TINY_HEADER_CLASSIDX
const size_t next_off_sll = (class_idx == 7) ? 0 : 1;
#else
const size_t next_off_sll = 0;
#endif
void* next = *(void**)((uint8_t*)sll + next_off_sll);
#include "tiny_nextptr.h"
void* next = tiny_next_load(sll, class_idx);
tiny_tls_list_guard_push(class_idx, tls, sll);
tls_list_push(tls, sll, class_idx);
sll = next;
@ -165,12 +161,8 @@ static void tiny_tls_cache_drain(int class_idx) {
g_fast_head[class_idx] = NULL;
g_fast_count[class_idx] = 0;
while (fast) {
#if HAKMEM_TINY_HEADER_CLASSIDX
const size_t next_off_fast = (class_idx == 7) ? 0 : 1;
#else
const size_t next_off_fast = 0;
#endif
void* next = *(void**)((uint8_t*)fast + next_off_fast);
#include "tiny_nextptr.h"
void* next = tiny_next_load(fast, class_idx);
tiny_tls_list_guard_push(class_idx, tls, fast);
tls_list_push(tls, fast, class_idx);
fast = next;
@ -184,13 +176,8 @@ static void tiny_tls_cache_drain(int class_idx) {
if (taken == 0u || head == NULL) break;
void* cur = head;
while (cur) {
// Header-aware next pointer from TLS list chain
#if HAKMEM_TINY_HEADER_CLASSIDX
const size_t next_off_tls = (class_idx == 7) ? 0 : 1;
#else
const size_t next_off_tls = 0;
#endif
void* next = *(void**)((uint8_t*)cur + next_off_tls);
#include "tiny_nextptr.h"
void* next = tiny_next_load(cur, class_idx);
SuperSlab* ss = hak_super_lookup(cur);
if (ss && ss->magic == SUPERSLAB_MAGIC) {
hak_tiny_free_superslab(cur, ss);