Re:Zig and Rust
by kristoff_it on Monday March 27, 2023 @01:49PM
(#35329890)
It's a function, when you call it, it allocates a frame on the stack.
[ Parent
| on HN ]
Re:Zig and Rust
by EVa5I7bHFq9mnYK on Tuesday March 28, 2023 @03:14AM
(#35336998)
In our times malloc always allocated on heap, not on stack. But things are different now, I guess.
True. But the author mentions malloc, it just sounds like he's using "stack" instead of "heap" by mistake.
I see, it was a deliberate choice: https://old.reddit.com/r/Zig/comments/123jpia/blog_post_zig_...