🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #38557

Re: A Real RAMDISK

#38557
From: "Scott P Leslie"
Date: Sun, 07 May 1989 01:45
32 lines
2094 bytes
Hello,
   I know that this has seemingly been discussed to death, but I
would like to share an idea about sizable/rebootable ram-disks.
I'm not completely sure that this will work since I am not all
that experienced with allocating memory in a background TSR.
    o Take any re-bootable ramdisk such as Eternal.s
    o Have it allocate a reasonable (say 64K) amount of high memory
    o Setup the boot sector, FATs, and directories
    o Setup a list of pointers to sector groups (in groups of 64).
    o When TOS (or anything else) requests a sector, strip off the
      lower 6 bits to find out which group the sector is in. Then
      look in the pointer list to see if the sector is currently
      in the ramdisk.
    o If the sector is in the ramdisk, pass it back normally.
    o If not, allocate another 32K for the ramdisk (64 sector worth)
      and do the read/write from/to it. This is allocated in TOS area.
    o If a warm-boot occurs,
        o Copy all the sectors from the TOS area to below the current
          high ram area. Then set the high -ram pointer to below this.
        o Execute the reboot code.
    o Thats about it...
My only problem with writing this myself is that I don't know how
to allocate the new 32K while in the background.  Sure, I can call
Malloc, but what happens to that memory when the current process
terminates? Won't it be returned to the system heap?  If not, won't
it fragment memory?
    That's all I have to say, now maybe someone can write an optimized
one for all of us to use. I would do it myself, but I don't know how
to do the memory allocation.  Oh well...
--
Thanks for listening,
Scott P. Leslie (UNCSPL@UNC)                         Jax
Technical Details
Message-ID: <8905070115.AA27335@ucbvax.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!UNC.BITNET!UNCSPL

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!UNC.BITNET!UNCSPL
From: UNCSPL@UNC.BITNET ("Scott P Leslie")
Newsgroups: comp.sys.atari.st
Subject: Re: A Real RAMDISK
Message-ID: <8905070115.AA27335@ucbvax.Berkeley.EDU>
Date: 7 May 89 01:45:00 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 32