2 unstable releases

0.2.0 Oct 30, 2018
0.1.0 Oct 28, 2018

#51 in #memory

Download history 75/week @ 2019-08-15 151/week @ 2019-08-22 36/week @ 2019-08-29 34/week @ 2019-09-05 21/week @ 2019-09-12 34/week @ 2019-09-19 11/week @ 2019-09-26 29/week @ 2019-10-03 22/week @ 2019-10-10 62/week @ 2019-10-17 37/week @ 2019-10-24 17/week @ 2019-10-31 14/week @ 2019-11-07 21/week @ 2019-11-14 17/week @ 2019-11-21

89 downloads per month
Used in 4 crates (1 directly)

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