MCPcopy Create free account
hub / github.com/Houseofmvps/codesight / dealloc

Function dealloc

plugins/ast/rust/src/lib.rs:64–72  ·  view source on GitHub ↗
(pointer: *mut u8, length: usize)

Source from the content-addressed store, hash-verified

62/// `ptr`/`len` must come from a prior `alloc` call.
63#[unsafe(no_mangle)]
64pub unsafe extern "C" fn dealloc(pointer: *mut u8, length: usize) {
65 if pointer.is_null() || length == 0 {
66 return;
67 }
68
69 unsafe {
70 std::alloc::dealloc(pointer, MemoryLayout::from_size_align_unchecked(length, 1));
71 }
72}
73
74// ─── ABI: per-kind extraction functions ───
75

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected