MCPcopy Create free account
hub / github.com/ezrosent/allocators-rs / c_malloc

Method c_malloc

malloc-bind/src/lib.rs:184–200  ·  view source on GitHub ↗

The C `malloc` function. `malloc` allocates storage sufficient to hold `size` bytes, and returns a pointer to it. The allocated memory is aligned to `MIN_ALIGN`. The memory is not initialized. If there is insufficient space to perform the allocation, `errno` is set to `ENOMEM` and the return value is `NULL`. # Platform-specific behavior On Linux, if `size` is 0, `malloc` returns either `NULL` o

(&self, size: size_t)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

c_reallocMethod · 0.45
c_reallocfMethod · 0.45

Implementers 1

alloc_impl.rselfmalloc/src/alloc_impl.rs

Calls 6

unlikelyFunction · 0.85
roundupFunction · 0.85
layout_from_size_alignFunction · 0.85
insert_layoutMethod · 0.80
allocMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected