Get the latest tech news

Nesting Allocators (2023)


— 2023-08-09 I regularly point people to Tmandry's 2021 post "Contexts and Capabilities in Rust". While nobody is actively working on the design at the moment, it's more because of prioritization than anything else.

Because not all objects are the same size this can leave gaps in memory, so occasionally the allocator spends some time reorganizing its internals (think: defragmentation). While the number of collection types and constructor methods are limited, things can quickly spiral out of hand when we factor in composition. In order for things to work uniformly across the ecosystem, every type which holds a Vec internally would need a second_in variant for all of their constructors and conversions.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Rust

Rust

Related news:

News photo

Writing an OS in Rust

News photo

Random access string compression with FSST and Rust

News photo

Rust in illumos