4 ms·
A lot of that is just a property of modern OSs, with good reason, intentionally not exposing these features to userspace processes. It's not really a function o
by Chabsff 3y ago
A lot of that is just a property of modern OSs, with good reason, intentionally not exposing these features to userspace processes. It's not really a function of the language itself.
- grotorea 3y agoHmm, true for virtual memory, didn't think of that, but CPU caches are inside the processor, can even the kernel control it at all?
- Chabsff 3y agoIt's not really a question of whether or not it's feasible, but rather: If the hardware were supports such operations, would they be expressible within the language? If they are, then we should point at the accessibility of the functionality rather than C. In this case, I could definitely see `set_cache_behavior(ptr, len, options)` being perfectly reasonable, so I'd argue that, again, the fact that we can't do it is more a property of the environment than the language itself.