508MB RAM disc on 512MB machine
Frederick Bambrough (1372) 837 posts |
Reading R-Comp’s announcement of an OS update for the ARMX6 and increased RAM disc size, I thought to amuse myself by trying for the maximum. Absent mindedly forgot about the BB -xM only having 512MB. Pulled the RAM disc column in the task manager until “System variable ‘Resource$Path’ not found” error box. MemNow shows 20 bytes of memory left. Apart from my senility (or because of), should I be allowed to do that? Not sure if there’s a way to recover except by reset. 20-10-15 ROM |
Jeffrey Lee (213) 6048 posts |
Technically you’ve always been able to break the OS by starving it of free memory, it’s just a bit easier to do it now that the RAM disc size limit has been increased, and the OS is more likely to fall over than (say) RISC OS 3.1 due to many systems being reliant on being able to make temporary allocations from the RMA. Part of me wants to leave this capability there, because I know there are bugs in how the OS handles out-of-memory situations – so as RISC OS 5.24 draws closer I’m hoping to spend some time fixing some of the more nasty ones. I’m OK with stuff stopping working if you starve the system of free memory, but I’d want to make sure that things will start working again once you shrink the RAM disc back down to a more sensible size. But on the other hand, part of me realises that it’s a bit silly that the OS makes it so easy for the user to break the system. So maybe we should do something like have the task manager place a limit on how small it allows the user to shrink the free pool? E.g. it shouldn’t allow you to take away the last 256K of free memory, or, some percentage of total RAM size for machines with under a certain amount of RAM. I’d say that a 32MB machine is at the low end of the spectrum, so we’d set the clamp at min (256K, total_ram*256K/32M). |
David Feugey (2125) 2709 posts |
Windows just reserve a part of memory for its own use. So only applications can break, never the OS. |
Rick Murray (539) 13851 posts |
I can’t speak for the reliability of Windows 10; but I hope you realise that it has taken thirty miserable years to get to where somebody can actually say “only applications can break, never the OS” with a straight face when referring to Windows. Windows 1 (1985) was icky and a bit crap. I have actually used this. It was less like Windows as we know it and more like a fancy version of DOSSHELL. tl;dr: Windows might be reasonable today, just remember it was a laughing stock for a long time. Anything can suffer if memory completely runs out. |
Rick Murray (539) 13851 posts |
Jeffrey – I like the idea of Switcher refusing to release the last ~256K so there is some buffer space for various internal memory claims. I have just done a test on my Pi. Older ROM, pre PMP. The RAM disc was never actually created, the machine entirely stiffed (not even the mouse pointer or keyboard LEDs work). Okay, it was a highly contrived example, but none the less, an unpleasant thing to run into by accident… |
Frederick Bambrough (1372) 837 posts |
That would be good. It’s not a problem that one can steal a stupid amount of memory but rather that it can’t be given back. If the RAM disc doesn’t die… |