Skip to content

Commit

Permalink
Added default type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulstrackx committed Oct 14, 2020
1 parent 4d5e096 commit b86fc1e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<S = Platform>(dlmalloc::Dlmalloc<S>);

/// 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<S>(dlmalloc::Dlmalloc<S>);

/// Constant initializer for `Dlmalloc` structure.
Expand Down

0 comments on commit b86fc1e

Please sign in to comment.