3 ms·
In a language without pointers, you don't need to do anything fancy. Your program just doesn't get any references to objects from other processes, and it can't
by tachyonbeam 6y ago
In a language without pointers, you don't need to do anything fancy. Your program just doesn't get any references to objects from other processes, and it can't touch what it can't see. In a language like C, you would need some kind of bounds-checking to make sure addresses live within the correct range, which, if you're going to implement without hardware support, is going to be dog slow, unless you can optimize some of them away with the compiler.
However, either way, hardware memory protection adds another layer of safety/security, just like the no-execute (NX) bit. It makes it harder for attackers to hijack your VM, and also less likely that a program, because of a bug in your VM, could crash other processes or even the kernel.