Struct rustc_resolve::DroplessArena [−][src]
pub(crate) struct DroplessArena {
pub(crate) start: Cell<*mut u8>,
pub(crate) end: Cell<*mut u8>,
pub(crate) chunks: RefCell<Vec<TypedArenaChunk<u8>, Global>>,
}Expand description
An arena that can hold objects of multiple different types that impl Copy
and/or satisfy !mem::needs_drop.
Fields
start: Cell<*mut u8>A pointer to the start of the free space.
end: Cell<*mut u8>A pointer to the end of free space.
The allocation proceeds downwards from the end of the chunk towards the start. (This is slightly simpler and faster than allocating upwards, see https://fitzgeraldnick.com/2019/11/01/always-bump-downwards.html.) When this pointer crosses the start pointer, a new chunk is allocated.
chunks: RefCell<Vec<TypedArenaChunk<u8>, Global>>A vector of arena chunks.
Auto Trait Implementations
impl !RefUnwindSafe for DroplessArena
impl !Sync for DroplessArena
impl Unpin for DroplessArena
impl UnwindSafe for DroplessArena
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes