Add v4 C7/C6 fast classify and small-segment v4 scaffolding

This commit is contained in:
Moe Charm (CI)
2025-12-10 19:14:38 +09:00
parent 3261025995
commit f2ce7256cd
11 changed files with 221 additions and 17 deletions

View File

@ -252,6 +252,15 @@ static inline int free_tiny_fast(void* ptr) {
}
tiny_route_kind_t route = tiny_route_for_class((uint8_t)class_idx);
if ((class_idx == 7 || class_idx == 6) &&
route == TINY_ROUTE_SMALL_HEAP_V4 &&
tiny_ptr_fast_classify_v4_enabled() &&
smallobject_hotbox_v4_can_own(class_idx, base)) {
small_heap_free_fast_v4(small_heap_ctx_v4_get(), class_idx, base);
return 1;
}
const int use_tiny_heap = tiny_route_is_heap_kind(route);
const TinyFrontV3Snapshot* front_snap =
__builtin_expect(tiny_front_v3_enabled(), 0) ? tiny_front_v3_snapshot_get() : NULL;
@ -319,7 +328,7 @@ static inline int free_tiny_fast(void* ptr) {
if (__builtin_expect(use_tiny_heap, 0)) {
switch (route) {
case TINY_ROUTE_SMALL_HEAP_V4:
if (class_idx == 7 || class_idx == 6) {
if (class_idx == 7 || class_idx == 6 || class_idx == 5) {
small_heap_free_fast_v4(small_heap_ctx_v4_get(), class_idx, base);
return 1;
}