Skip to main content

check_alloc

Function check_alloc 

Source
pub fn check_alloc(count: usize, size: usize) -> RtResult<usize>
Expand description

Checks a request for count items of size bytes before allocating it, so that sizes the machine cannot provide raise a MemoryError panic (with the program’s stack trace) instead of aborting the process in the allocator. Returns the size in bytes.