Re:The C juggernaut illustrated (2012)
by SAI_Peregrinus on Sunday February 05, 2023 @05:10PM
(#34670134)
That's not always viable. Allowing heap allocation only at init is pretty common in embedded. Read config to get sizes, allocate at startup, never call free().
[ Parent
| on HN ]
Re:The C juggernaut illustrated (2012)
by steveklabnik on Sunday February 05, 2023 @09:58PM
(#34672735)
I don't understand what you mean by "That's not always viable." You can either call malloc, or you can't. If you can only call it at startup, only call it at startup. Every project has different requirements, and Rust will let you satisfy any of them.