3 ms·
It's a function, when you call it, it allocates a frame on the stack.
by kristoff_it 4y ago
It's a function, when you call it, it allocates a frame on the stack.
- einarr 4y agoTrue. But the author mentions malloc, it just sounds like he's using "stack" instead of "heap" by mistake.
- einarr 4y agoI see, it was a deliberate choice: https://old.reddit.com/r/Zig/comments/123jpia/blog_post_zig_and_rust/jdvj1bx/ https://old.reddit.com/r/Zig/comments/123jpia/blog_post_zig_...
- EVa5I7bHFq9mnYK 4y agoIn our times malloc always allocated on heap, not on stack. But things are different now, I guess.