Comment

Comment by kjeetgill

Depending on what your working on, it's actually super nice to know very clearly what lives on the stack vs the heap for performance and compactness reasons. Basically anything that didn't come from malloc or a function calling malloc lives on the stack and doesn't live past the function it was allocated in.

And these days, if you're bothering with C you probably care about these things. Accidentally promoting from the stack to the heap would be annoying.

parent kjeetgill 11 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton