Hacker News new | past | comments | ask | show | jobs | submit login

> How can one C object span two symbols in the first place for this assumption to be invalid?

Because Linux isn’t written in C. It’s written in C, assembler, and linker script (.lds). In both assembly and linker script, one can lay out multiple symbols with a defined relationship. Unfortunately, C doesn’t have a way to say “give me a pointer to the object 10 bytes past the address p. Yes, I know it’s valid and it is not the same object as p.”




I believe for most, if not all, architectures the synchronization and memory barrier primitives cannot be written in standard C.


That has not been true since C11.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: