2 unstable releases

new 0.2.0 Dec 16, 2024
0.1.0 Nov 28, 2024

#274 in Memory management

Download history 67/week @ 2024-11-22 52/week @ 2024-11-29 8/week @ 2024-12-06 154/week @ 2024-12-13

281 downloads per month

MIT license

53KB
1.5K SLoC

A garbage collected arena in which garbage collected boxes can be allocated, and which can't escape from the arena, using invariant lifetimes.

The main type of this crate is the garbage collected pointer Gc. It is a thin smart pointer branded with an invariant lifetime, to ensure that it is unable to escape from the arena in which it was allocated.

The Gc is capable of holding any type which implements the Collect trait, which includes most types which do not contain interior mutability.

This library is more or less a rewrite of gc-arena, with additional nightly features, such as the allocator api, and pointer metadata, to make the garbage collected pointers store the metadata on the heap.

No runtime deps