- Add arena allocator for zero-allocation hot paths - Add thread pool for parallel operations - Add mmap utilities for memory-mapped I/O - Implement queue_index with heap-based priority queue - Implement dataset_hash with SIMD support (SHA-NI, ARMv8) - Add runtime SIMD detection for cross-platform correctness - Add comprehensive tests and benchmarks
19 lines
289 B
C++
19 lines
289 B
C++
#include "arena_allocator.h"
|
|
|
|
namespace fetchml::common {
|
|
|
|
thread_local ArenaAllocator g_arena;
|
|
|
|
ArenaAllocator* thread_local_arena() {
|
|
return &g_arena;
|
|
}
|
|
|
|
void begin_arena_scope() {
|
|
g_arena.begin();
|
|
}
|
|
|
|
void end_arena_scope() {
|
|
g_arena.end();
|
|
}
|
|
|
|
} // namespace fetchml::common
|