[−][src]Struct wasm_tracing_allocator::WasmTracingAllocator
A global allocator that traces the Wasm module's allocations and deallocations.
It wraps some global allocator A
that actually implements the allocation
and deallocation, and inserts its tracing after each invocation.
Example
Just give it the global allocator A
to wrap, and add the
#[global_allocator]
attribute. The module level documentation has an
example of wrapping the default system allocator. Here is an example of
wrapping wee_alloc
:
ⓘThis example is not tested
// src/lib.rs use wasm_tracing_allocator::WasmTracingAllocator; use wee_alloc::WeeAlloc; #[global_allocator] static GLOBAL_ALLOCATOR: WasmTracingAllocator<WeeAlloc> = WasmTracingAllocator(WeeAlloc::INIT);
Trait Implementations
impl<A: Debug> Debug for WasmTracingAllocator<A> where
A: GlobalAlloc,
[src]
A: GlobalAlloc,
impl<A> GlobalAlloc for WasmTracingAllocator<A> where
A: GlobalAlloc,
[src]
A: GlobalAlloc,
Auto Trait Implementations
impl<A> Send for WasmTracingAllocator<A> where
A: Send,
A: Send,
impl<A> Sync for WasmTracingAllocator<A> where
A: Sync,
A: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,