In the good old days, mostly in the pre-internet era, it was perfectly normal for a person to access whatever memory they like. Take a look at Amiga and Atari computers for example. There is/was no official `memory protection`. And yes there were crashes and programs did, usually accidentally, access the wrong memory and end up overwriting stuff it shouldn't. This *could* lead to interfering with harddrive content and causing other crashes.
With the continued progress of `modern` operating systems, they decided hey, we keep getting this happen so lets make it so that each program thinks they own the whole system but actually they don't, they live in a confined box and only access the memory they've asked for. The hardware then sets up page faults and stuff like that which throw up (literally?) exceptions and such to indicate that some program tried to access memory it doesn't have the right to access. *SUPPOSEDLY* this is a cure for bad programs. However, in my book it is covering up a bigger issue of bad programming languages that don't produce safe code.
But even beyond that, I think there is also some merit to any program having the freedom to access any part of the system it wants to, to take over the whole thing if it likes. I don't see anything wrong with that, it's very commonplace on the Amiga for example. Memory protection is a half-measure, an attempt to compensate for poor programming and faulty languages and is also an attempt to make a system be a multi-program system even though there is really only one system there. Some people like it, some don't.
There are risks involved but if you know what you are doing there's no reason why the world shouldn't be your oyster or why you shouldn't be able to do whatever you like with your computer. Funny how people get locked out of their own computers these days.
I would recommend using static banks if you want to fiddle around in memory, unless you really need it to be fast in which case use [0] or even eachin might work.
With the continued progress of `modern` operating systems, they decided hey, we keep getting this happen so lets make it so that each program thinks they own the whole system but actually they don't, they live in a confined box and only access the memory they've asked for. The hardware then sets up page faults and stuff like that which throw up (literally?) exceptions and such to indicate that some program tried to access memory it doesn't have the right to access. *SUPPOSEDLY* this is a cure for bad programs. However, in my book it is covering up a bigger issue of bad programming languages that don't produce safe code.
But even beyond that, I think there is also some merit to any program having the freedom to access any part of the system it wants to, to take over the whole thing if it likes. I don't see anything wrong with that, it's very commonplace on the Amiga for example. Memory protection is a half-measure, an attempt to compensate for poor programming and faulty languages and is also an attempt to make a system be a multi-program system even though there is really only one system there. Some people like it, some don't.
There are risks involved but if you know what you are doing there's no reason why the world shouldn't be your oyster or why you shouldn't be able to do whatever you like with your computer. Funny how people get locked out of their own computers these days.
I would recommend using static banks if you want to fiddle around in memory, unless you really need it to be fast in which case use [0] or even eachin might work.