diff --git a/src/lib.rs b/src/lib.rs index 2400d55..72553b2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,6 +79,15 @@ pub trait System { /// Instances of this type are used to allocate blocks of memory. For best /// results only use one of these. Currently doesn't implement `Drop` to release /// lingering memory back to the OS. That may happen eventually though! +#[cfg(any(target_os = "linux", target_arch = "wasm32", target_os = "macos"))] +pub struct Dlmalloc(dlmalloc::Dlmalloc); + +/// An allocator instance +/// +/// Instances of this type are used to allocate blocks of memory. For best +/// results only use one of these. Currently doesn't implement `Drop` to release +/// lingering memory back to the OS. That may happen eventually though! +#[cfg(not(any(target_os = "linux", target_arch = "wasm32", target_os = "macos")))] pub struct Dlmalloc(dlmalloc::Dlmalloc); /// Constant initializer for `Dlmalloc` structure.