Phase12 debug: restore SUPERSLAB constants/APIs, implement Box2 drain boundary, fix tiny_fast_pop to return BASE, honor TLS SLL toggle in alloc/free fast paths, add fail-fast stubs, and quiet capacity sentinel. Update CURRENT_TASK with A/B results (SLL-off stable; SLL-on crash).
This commit is contained in:
@ -1236,7 +1236,7 @@ static inline __attribute__((always_inline)) pthread_t tiny_self_pt(void) {
|
||||
// tiny_mmap_gate.h already included at top
|
||||
#include "tiny_publish.h"
|
||||
|
||||
int g_sll_cap_override[TINY_NUM_CLASSES] = {0}; // HAKMEM_TINY_SLL_CAP_C{0..7}
|
||||
int g_sll_cap_override[TINY_NUM_CLASSES] = {0}; // LEGACY (Phase12以降は参照しない/互換用ダミー)
|
||||
// Optional prefetch on SLL pop (guarded by env: HAKMEM_TINY_PREFETCH=1)
|
||||
static int g_tiny_prefetch = 0;
|
||||
|
||||
@ -1501,12 +1501,7 @@ static inline void* hak_tiny_alloc_superslab_try_fast(int class_idx) {
|
||||
// SLL capacity policy: for hot tiny classes (0..3), allow larger SLL up to multiplier * mag_cap
|
||||
// for >=4 keep current conservative half (to limit footprint).
|
||||
static inline uint32_t sll_cap_for_class(int class_idx, uint32_t mag_cap) {
|
||||
// Absolute override
|
||||
if (g_sll_cap_override[class_idx] > 0) {
|
||||
uint32_t cap = (uint32_t)g_sll_cap_override[class_idx];
|
||||
if (cap > TINY_TLS_MAG_CAP) cap = TINY_TLS_MAG_CAP;
|
||||
return cap;
|
||||
}
|
||||
// Phase12: g_sll_cap_override は非推奨。ここでは無視して通常capを返す。
|
||||
uint32_t cap = mag_cap;
|
||||
if (class_idx <= 3) {
|
||||
uint32_t mult = (g_sll_multiplier > 0 ? (uint32_t)g_sll_multiplier : 1u);
|
||||
|
||||
Reference in New Issue
Block a user