#alloc #traits #bare-metal #replace

no-std alloc-traits

Traits to replace or supplement the alloc module in no_std

2 releases

0.1.1 Jan 29, 2020
0.1.0 Jan 17, 2020

#590 in Embedded development

Download history 3453/week @ 2022-03-12 3543/week @ 2022-03-19 2084/week @ 2022-03-26 3373/week @ 2022-04-02 2692/week @ 2022-04-09 3553/week @ 2022-04-16 3845/week @ 2022-04-23 3926/week @ 2022-04-30 2586/week @ 2022-05-07 3103/week @ 2022-05-14 2919/week @ 2022-05-21 2714/week @ 2022-05-28 1891/week @ 2022-06-04 2249/week @ 2022-06-11 2102/week @ 2022-06-18 1361/week @ 2022-06-25

8,032 downloads per month
Used in 37 crates (2 directly)

MIT license

14KB
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