the.bay.news

Exploring the idea of a more modular alternative design to `std.mem.Allocator`

Ziggit
Exploring the idea of a more modular alternative design to `std.mem.Allocator`
The thing that inspired this post: I remember reading a blog post from matklad (IIRC that is, I can’t find it unfortunately), which introduced me to the concept of using arena v.s. gpa to manage the lifetime of internal allocations of functions. Consider the following function: pub fn doWork(...) struct { foo: []const u8, bar: *Thing, // might even contain references to other allocated data :O } { ... } how would you manage the lifetime of .foo and .bar? In rust, doWork might rece...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.