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

> What I'm talking about is a hypothetical language that makes memory operations in critical sections forbidden and considered a compilation error.

This is easy to do in C, and you'll see it in embedded code. A simple preprocessor macro that redefined malloc to something that causes an error.

To enable malloc in some chunk of code (embedded defaults to "malloc is bad"), you can define it accordingly in the .c files that need it.



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

Search: