Function ralloc::free
[−]
[src]
pub unsafe fn free(ptr: *mut u8, size: usize)
Free a buffer.
Note that this do not have to be a buffer allocated through ralloc. The only requirement is that it is not used after the free.
Important!
You should only allocate buffers allocated through ralloc. Anything else is considered
invalid.
Errors
The OOM handler handles out-of-memory conditions.
Safety
Rust assume that the allocation symbols returns correct values. For this reason, freeing invalid pointers might introduce memory unsafety.
Secondly, freeing an used buffer can introduce use-after-free.