Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wouldn’t that mean they’re on the heap by default? Your program will have to malloc something if they don’t go on the stack.

(My low level knowledge is limited, may be completely wrong)



In some (interpreted mostly) languages they are. Like some also don't have a stack at all.

But in the most common languages, there is special storages for globals, statics, and constants, which is what the grandparent means (e.g. the DATA section).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: