UsmAllocatorKind

Trait UsmAllocatorKind 

Source
pub trait UsmAllocatorKind {
    // Required method
    unsafe fn alloc(
        alignment: usize,
        num_bytes: usize,
        queue: &Queue,
    ) -> Result<*mut u8, Exception>;
}

Required Methods§

Source

unsafe fn alloc( alignment: usize, num_bytes: usize, queue: &Queue, ) -> Result<*mut u8, Exception>

Allocates uninitialized memory. Safety: the caller must not read uninitialized memory. The caller must also free this memory manually.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§