Lennart Sorensen wrote: > How can software protect you from bad pointers clobbering memory from > some other process? Sure the language/compiler can runtime check every > pointer before using it. Sounds very inefficient though.
It's called static analysis or type checking. The compiler proves that there are no bad pointers as much as possible, so it doesn't have to check them at run time. If there are any remaining ones, it can check them. Depending on the language and type of program, it is sometimes possible to prove there are no bad pointers and nothing has to be done when the program is running. > There are things that are trivial to do in hardware and very hard (or > at least very expensive) to do in software. Memory protection is one > of those things. Having used both no-MMU architectures and MMU architectures, I _strongly_ recommend having a decent MMU. It is not just memory protection (you can get that with an MPU). It's the ability to avoid memory fragmentation, which is a serious problem with no-MMU architectures running Linux - at least if you often spawn processes and things like that. Fragmentation is a much bigger problem than I would have expected when I first started doing uClinux. Then again, if you're using type-safe languages or run-times designed for the purpose, fragmentation needn't be an issue either. -- Jamie _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev