2 releases

0.1.1 Jan 29, 2020
0.1.0 Jan 17, 2020

#674 in Memory management

Download history 1610/week @ 2024-03-16 1637/week @ 2024-03-23 1959/week @ 2024-03-30 1979/week @ 2024-04-06 1899/week @ 2024-04-13 2486/week @ 2024-04-20 2370/week @ 2024-04-27 2629/week @ 2024-05-04 4392/week @ 2024-05-11 6213/week @ 2024-05-18 8261/week @ 2024-05-25 8555/week @ 2024-06-01 6173/week @ 2024-06-08 6720/week @ 2024-06-15 5163/week @ 2024-06-22 3318/week @ 2024-06-29

22,750 downloads per month
Used in 46 crates (2 directly)

MIT license

15KB
187 lines

alloc-traits

Defines no_std and bare metal usable traits that can be implemented to defined different kinds of allocators, similar to alloc::GlobalAlloc. But unlike the standard library trait they do not presume global uniqueness and static lifetime of the memory resource provider. In return, the allocators are not required to implement the Sync bound and can easily be built without operating system support to be usable.

There are additional independent crates with additional abstractions on-top:

  • static-alloc: A simple allocator drawing from a memory region statically embedded within the compiled binary.
  • without-alloc: A set of data structures (Box, Vec, Rc, ...) that can be allocated from the implementors of the traits defined here.

lib.rs:

Traits to replace or supplement the alloc module in no_std.

Defines traits, similar to alloc::GlobalAlloc, that can be implemented to defined different kinds of allocators. Unlike the standard library one they do not presume global uniqueness and static lifetime of the memory resource provider. In return, the allocators are not required to implement the Sync bound and can easily be built without operating system support to be usable.

There are additional independent crates with additional abstractions on-top:

  • static-alloc: A simple allocator drawing from a memory region statically embedded within the compiled binary.
  • without-alloc: A set of data structures (Box, Vec, Rc, ...) that can be allocated from the implementors of the traits defined here.

No runtime deps