Skip to content

Releases: Mnwa/NUMAlloc-rs

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

Choose a tag to compare

@Mnwa Mnwa released this 11 Apr 15:55
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

Bug fix release

Choose a tag to compare

@Mnwa Mnwa released this 10 Apr 15:20
9feb0de

Fixes

  • NUMAlloc brokes on projects with a lot of allocations (unknown linux gnu)
  • Trying to allocate more memory than available

What's Changed

  • Fix deadlock and infinite recursion when used as #[global_allocator] by @Mnwa in #1
  • Fix broken tests by @Mnwa in #2

Full Changelog: https://github.com/Mnwa/NUMAlloc-rs/commits/v0.1.1