Skip to content

Unsafe allocator usage #40

@cybermoonman

Description

@cybermoonman

align 1, size n allocated here:

alloc::alloc::alloc_zeroed(alloc::alloc::Layout::array::<u8>(size).expect("To create layout for bytes"))

deallocated here:

alloc::alloc::dealloc(data as _, BYTES_LAYOUT)

with align 1 size 1

https://doc.rust-lang.org/stable/alloc/alloc/fn.dealloc.html
https://doc.rust-lang.org/stable/alloc/alloc/trait.GlobalAlloc.html#tymethod.dealloc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions