Skip to content

v0.1.2 Feature flags, safety improvements & allocation fast-path optimization

Latest

Choose a tag to compare

@Mnwa Mnwa released this 11 Apr 15:55
· 8 commits to master since this release
c2eba0b

What's Changed

numa-binding feature flag

  • Added a numa-binding default feature flag that gates all NUMA-specific syscalls (mbind, sched_setaffinity, topology detection). When disabled (--no-default-features), the allocator operates in single-node mode — useful for non-NUMA systems or cross-platform builds where NUMA APIs are unavailable.

SysBox<T> — safer system-allocator-backed ownership

  • Introduced SysBox<T>, a Box<T>-like smart pointer that always routes through the system allocator. This replaces raw NonNull<PerThreadHeap> + manual System.dealloc in thread-local storage with proper RAII ownership. Thread-local cleanup (draining freelists, flushing large object cache) now happens automatically via Drop instead of manual pointer management.

Allocation fast-path optimization

  • Reordered the allocation hot path to check the per-thread freelist cache before touching the global heap, avoiding unnecessary heap access on cache hits.

Code organization

  • Moved integration tests from src/lib.rs to tests/local_allocator.rs for cleaner separation of library code and tests.

Full Changelog

  • Move lib tests to tests dir
  • Create sys box to improve safety
  • dont call heap before thread cache checks
  • Add a numa-binding default feature flag with selective NUMA support