MCPcopy Create free account
hub / github.com/bnjbvr/trinity / cabi_dealloc

Function cabi_dealloc

modules/libcommand/src/trinity_module.rs:596–602  ·  view source on GitHub ↗
(ptr: *mut u8, size: usize, align: usize)

Source from the content-addressed store, hash-verified

594 }
595 }
596 pub unsafe fn cabi_dealloc(ptr: *mut u8, size: usize, align: usize) {
597 if size == 0 {
598 return;
599 }
600 let layout = alloc::Layout::from_size_align_unchecked(size, align);
601 alloc::dealloc(ptr, layout);
602 }
603 pub unsafe fn invalid_enum_discriminant<T>() -> T {
604 if cfg!(debug_assertions) {
605 panic!("invalid enum discriminant")

Callers 4

_export_init_cabiFunction · 0.85
__post_return_helpFunction · 0.85
__post_return_adminFunction · 0.85
__post_return_on_msgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected