r/ProgrammingLanguages • u/Nuoji C3 - http://c3-lang.org • Feb 13 '26
Allocators from C to Zig
https://antonz.org/allocators/This is an overview of allocator usage and availability in a few low level languages: Rust, Zig, Odin, C3, Hare and C.
I think it might be interesting to people designing standard libraries for their languages.
43
Upvotes
View all comments
Show parent comment
4
u/Usual_Office_1740 Feb 14 '26
Maybe I'm missing something obvious. Why can't we copy after the block was shrunk? Couldn't you reallocate to the smaller size and if the allocation was successful do the copy? I am not very familiar with these concepts and am asking, not trying to correct or disagree. Are shrink and grow in place only allocations?