chore: Gate exports using allocator-limits feature (#564)

This is needed to publish regorus-mimalloc

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2026-01-30 23:56:29 +05:30
committed by GitHub
parent 3f7a5496dc
commit 0e9e34a519
2 changed files with 3 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
#[cfg(not(any(target_family = "wasm")))]
pub mod mimalloc;
#[cfg(feature = "allocator-memory-limits")]
#[cfg(not(any(target_family = "wasm")))]
pub use mimalloc::{
allocation_stats_snapshot, current_thread_allocation_stats, global_allocation_stats_snapshot,

View File

@@ -29,9 +29,9 @@ unsafe impl GlobalAlloc for Mimalloc {
}
#[inline]
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
#[cfg(feature = "allocator-memory-limits")]
record_free(layout.size());
record_free(_layout.size());
mi_free(ptr.cast::<c_void>());
}