type AllocatorWrapper = ProfiledAllocator<Jemalloc>;
Aliased Type§
struct AllocatorWrapper(/* private fields */);
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes
Implementations
§impl<T> ProfiledAllocator<T>
impl<T> ProfiledAllocator<T>
pub const fn new(
inner_allocator: T,
callstack_depth: u16,
) -> ProfiledAllocator<T>
pub const fn new( inner_allocator: T, callstack_depth: u16, ) -> ProfiledAllocator<T>
Construct a new ProfiledAllocator
.
Specifying a non-zero callstack_depth
will enable collection of callstack for this
message. The number provided will limit the number of call frames collected. Note that
enabling callstack collection introduces a non-trivial amount of overhead to each
allocation and deallocation.
Trait Implementations
§impl<T> GlobalAlloc for ProfiledAllocator<T>where
T: GlobalAlloc,
impl<T> GlobalAlloc for ProfiledAllocator<T>where
T: GlobalAlloc,
§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout
. Read more