Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.ira.uka.de Newsgroups: comp.sys.mac.programmer Subject: Re: Ram Disks... Message-ID: <1394@smurf.ira.uka.de> Date: 15 Jan 90 22:31:50 GMT References: <69382@tiger.oxy.edu> <25929@cup.portal.com> Reply-To: urlichs@smurf.ira.uka.de (Matthias Urlichs) Organization: University of Karlsruhe, FRG Lines: 30 In comp.sys.mac.programmer ts@cup.portal.com (Tim W Smith) writes: < < Be sure to write the part that transfers data in assembly language. < I hacked up my SCSI driver to be a RAM disk driver one day, and for < the first version I just did a byte-at-a-time copy from C, and the < RAM disk was only about 4 times as fast as my Quantum drive! < I don't know what this friendly programmer recommends. I recommend _BlockMove. (No assembly language, no hassle...) Having written a (rather hacked-together) volume-partitioning piece of code myself, I can attest to the fact that the actual reading and writing code is _simple_. It's rather more involved to get async requests, and immediate requests, and R/W requests relative to the current position, to work correctly. (I think the MPW driver glue code still isn't up to standard in the former two cases, but I didn't check lately. The latter, you'll of course have to handle yourself. And don't forget to check for the fact that your RAM disk isn't infinite...) And then of course you'll have to initialize the RAM disk, mount it, copy stuff onto it, handling all kinds of wierd errors you never thought could possibly happen before -- good luck! < Stick a CD-ROM on the Surfboard at this point, and you have a simple < way to share a CD-ROM among multiple machines. Not bad for something < that took less than two days to implement, eh? If sharing read/write disks were only half that easy... ;-) -- Matthias Urlichs