Re:Smart pointers for the kernel
by Dylan16807 on Saturday October 19, 2024 @03:58PM
(#41890304)
When you write "unsafe", you are promising to the compiler that the unsafe code enforces the assumptions it is making.
Unsafe code needs to keep its assumption-laden variables private, and it needs to verify the parameters that safe code sends it. If it doesn't do those things, it's breaking that promise.
Unsafe code needs to keep its assumption-laden variables private, and it needs to verify the parameters that safe code sends it. If it doesn't do those things, it's breaking that promise.