]> git.nega.tv - josh/narcissus/commit
Add `Arena` and `HybridArena`
authorJoshua Simmons <josh@nega.tv>
Wed, 2 Nov 2022 21:16:50 +0000 (22:16 +0100)
committerJoshua Simmons <josh@nega.tv>
Wed, 2 Nov 2022 21:16:50 +0000 (22:16 +0100)
commitccd58205c8c71526c5923ace65908f0572609702
tree6159ae3914c94883ec4d922e9fadbbcbbe76a98f
parente0547227711e9c40c0c83db3ecb6a4fc76d744e6
Add `Arena` and `HybridArena`

Add two variants on a simple bump allocator. Based loosly on the bumpalo
crate.

Provides two types, `Arena` which always allocates from the heap and
`HybridArena` which will first use a stack allocated page, then fall
back to allocating from the heap as well.
narcissus-core/src/arena.rs [new file with mode: 0644]
narcissus-core/src/lib.rs