mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
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:
committed by
GitHub
parent
3f7a5496dc
commit
0e9e34a519
@@ -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,
|
||||
|
||||
@@ -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>());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user