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:
@ -85,7 +85,12 @@ static inline __attribute__((always_inline)) void* tiny_fast_pop(int class_idx)
|
||||
#else
|
||||
const size_t next_offset = 0;
|
||||
#endif
|
||||
void* next = *(void**)((uint8_t*)head + next_offset);
|
||||
// Use safe unaligned load for "next" to avoid UB when offset==1
|
||||
void* next = NULL;
|
||||
{
|
||||
#include "tiny_nextptr.h"
|
||||
next = tiny_next_load(head, class_idx);
|
||||
}
|
||||
g_fast_head[class_idx] = next;
|
||||
uint16_t count = g_fast_count[class_idx];
|
||||
if (count > 0) {
|
||||
@ -124,7 +129,10 @@ static inline __attribute__((always_inline)) int tiny_fast_push(int class_idx, v
|
||||
#else
|
||||
const size_t next_offset2 = 0;
|
||||
#endif
|
||||
*(void**)((uint8_t*)ptr + next_offset2) = g_fast_head[class_idx];
|
||||
{
|
||||
#include "tiny_nextptr.h"
|
||||
tiny_next_store(ptr, class_idx, g_fast_head[class_idx]);
|
||||
}
|
||||
g_fast_head[class_idx] = ptr;
|
||||
g_fast_count[class_idx] = (uint16_t)(count + 1);
|
||||
g_fast_push_hits[class_idx]++;
|
||||
|
||||
Reference in New Issue
Block a user