2 unstable releases

Uses old Rust 2015

0.2.0 Oct 30, 2018
0.1.0 Oct 28, 2018

#447 in Memory management

Download history 5129/week @ 2024-01-12 5111/week @ 2024-01-19 4533/week @ 2024-01-26 10410/week @ 2024-02-02 11167/week @ 2024-02-09 7320/week @ 2024-02-16 6587/week @ 2024-02-23 6675/week @ 2024-03-01 5174/week @ 2024-03-08 3872/week @ 2024-03-15 4441/week @ 2024-03-22 4529/week @ 2024-03-29 4716/week @ 2024-04-05 4823/week @ 2024-04-12 5234/week @ 2024-04-19 3305/week @ 2024-04-26

18,686 downloads per month
Used in 116 crates (via lockfree)

MIT license

634 lines

Owned Alloc

This is an attempt of reducing erros with manual memory allocation in Rust. See docs for more details.

Docs: https://bzim.gitlab.io/owned-alloc/owned_alloc/


Owned Allocations. A crate to help reducing manual memory management errors.

The idea is to use a type like UninitAlloc for uninitialized dynamic allocations. After initializing it, you have a OwnedAlloc which is pretty similar to a Box. However, unlike a Box, you may move the value out from the OwnedAlloc and getting an UninitAlloc back.

For vec-like structures, a type RawVec is available, pretty similar to the one used by the standard library. Currently, no other help is provided for arrays/vectors.

There is also a type Cache, which is actually more general than allocation, but may be useful for allocations. It can save unused allocations requested on a tight loop.

No runtime deps