2 releases

0.1.1 Jan 29, 2020
0.1.0 Jan 17, 2020

#661 in Memory management

Download history 5828/week @ 2024-07-21 6440/week @ 2024-07-28 4549/week @ 2024-08-04 4825/week @ 2024-08-11 5673/week @ 2024-08-18 6731/week @ 2024-08-25 6201/week @ 2024-09-01 5269/week @ 2024-09-08 5614/week @ 2024-09-15 5400/week @ 2024-09-22 5190/week @ 2024-09-29 3583/week @ 2024-10-06 4685/week @ 2024-10-13 7614/week @ 2024-10-20 8272/week @ 2024-10-27 9293/week @ 2024-11-03

30,218 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