2 unstable releases

0.2.0 Oct 30, 2018
0.1.0 Oct 28, 2018

#68 in Memory management

Download history 20/week @ 2018-12-19 43/week @ 2018-12-26 6/week @ 2019-01-02 10/week @ 2019-01-09 31/week @ 2019-01-16 29/week @ 2019-01-23 30/week @ 2019-01-30 105/week @ 2019-02-06 52/week @ 2019-02-13 154/week @ 2019-02-20 55/week @ 2019-02-27 97/week @ 2019-03-06 25/week @ 2019-03-13 41/week @ 2019-03-20 26/week @ 2019-03-27

119 downloads per month
Used in 1 crate

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