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

C provides no guarantees about the memory layout of distinct globals. If you want a specific contiguous layout, you need to define it as a buffer. In practice though, most linkers will place them contiguously since they are simply appended to the constants section in the order they are parsed.


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

Search: