4 ms·
So what you're saying is, "if your use-case doesn't support kmalloc then shut up and go away, no statics for you!"? That's ridiculous, inappropriate, and genera
by belovedeagle 9y ago
So what you're saying is, "if your use-case doesn't support kmalloc then shut up and go away, no statics for you!"? That's ridiculous, inappropriate, and generally unhelpful.
- bascule 9y agoNo, again that's a strawman. To explain it for the third time: I was addressing a specific complaint made in the paper and providing a solution. So far I have not seen any counterarguments against this specific solution to this specific problem. Later I pointed out allocators are a great solution if you're able to use them. Again, if you can't, I'm afraid you're out of luck and I apologize this solution doesn't fit your needs. You can, of course, still make statics, you just won't be able to use Box to conveniently allocate buffers in an automatic and type-safe way. Also check out UnsafeCell if you want to assert as the developer on behalf of your program that you're accessing data in a memory safe way.