Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!mcsun!ukc!stl!crosfield!djhr From: djhr@crosfield.co.uk (dave redman) Newsgroups: comp.sys.acorn Subject: virtual memory Keywords: virtual memory Message-ID: <10396@suns502.crosfield.co.uk> Date: 25 Jun 91 10:16:35 GMT Article-I.D.: suns502.10396 Organization: Crosfield Electronics, Hemel Hempstead, United Kingdom. Lines: 40 About Virtual Memory, I actually wrote some code ( C and assembler ) that enables page swapping to and from memory to harddisc. I wrote to Acorn asking about how to hook it into riscos and was told in NO uncertain terms that riscos CAN NOT use virtual memory. It appears that this is because any page swap that occurs in supervisor mode will corrupt the supervisor return link, thus the code cannot re-start after the page fault. The only cure to this is to save the return link on entry to every supervisor mode subroutine that MAY get swapped. I managed to get BASIC to read and write to virtual memory including swapping, but I effectively reduced the amount of memory available for swapping by marking VIDEO (obviously), RMA and sub 8000 address space as NON mobile. I eventually gave up after getting the DATA-ABORT routine, and half the PREFETCH-ABORT working because I discovered that page faults that occur on instruction fetchs at a page boundary do funny things and needs extra code to fix it. I couldn't be bothered to work it out and after Acorn said they wouldn't tell me how to hook it into riscos anyway I just gave up. Anyway if you want to talk over my approach etc e-mail me. Actually, does anyone out there in netland know how I can convince the harddisc controller that the disc is partitioned ? ( means convincing riscos too ). I ask because the current version uses direct disc address writes for speed ( but via adfs ) but if the disc was compacted or the file ( that I use as swap space ) is not contigous then the disc gets trashed !!!! Having the ability to write to different partitions would solve this.. Ideas and sugestions will be gratefully accepted.. and I know it is possible because riscix MUST use partitions. Acorn - a chance at last for you to redeem yourself in my eyes !! dave. djhr@crosfield.co.uk