34b3d41e1a
Add doc aliases for memory allocations This patch adds doc aliases for various C allocation functions, making it possible to search for the C-equivalent of a function and finding the (safe) Rust counterpart: - `Vec::with_capacity` / `Box::new` / `vec!` -> alloc + malloc, allocates memory - `Box::new_zeroed` -> calloc, allocates zeroed-out memory - `Vec::{reserve,reserve_exact,try_reserve_exact,shrink_to_fit,shrink_to}` -> realloc, reallocates a previously allocated slice of memory It's worth noting that `Vec::new` does not allocate, so we don't link to it. Instead people are probably looking for `Vec::with_capacity` or `vec!`. I hope this will allow people comfortable with the system allocation APIs to make it easier to find what they may be looking for. Thanks! |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |