Path: utzoo!utgpu!water!watmath!watcgl!lily!jafischer From: jafischer@lily.waterloo.edu (Jonathan A. Fischer) Newsgroups: comp.sys.atari.st Subject: Re: RAM disks (was: small assesment of some formaters) Keywords: format, review Message-ID: <3335@watcgl.waterloo.edu> Date: 23 Feb 88 06:17:47 GMT References: <439@dukempd.UUCP> <1418@water.waterloo.edu> Sender: daemon@watcgl.waterloo.edu Reply-To: jafischer@lily.waterloo.edu (Jonathan A. Fischer) Organization: U. of Waterloo, Ontario Lines: 44 In article <439@dukempd.UUCP> gpm@dukempd.UUCP (Guy Metcalfe) asks: > P.S. I'd still like to hear from someone about my desire > to find a resizeable and reset survivable ram disk. > At least tell me why it's hard to do. I got no response > to an earily inquiry except for requests to pass any > information along. Actually, this is one of those things I've had on the "what to do if I ever have enough free time for programming" list. But I was just pondering the question last week, and here are a couple of reasons that it is hard and quite likely impossible (and of course I'm open to corrections): o If you wanted a reset-proof ramdisk, somehow you'd have to find a way to make TOS think that its physical memory size was changing on the fly -- at least, that's the way "eternal" does it. The "eternal" ram-disk changes the top-of- memory pointer and then performs a warm boot. I don't know if you can avoid the need for a reset when you want to set a new top-of-ram value. (In fact, I'm not entirely sure why it's necessary. Why doesn't "eternal" just do a big Malloc() once when it is run from the auto folder?) o The main problem is with the Malloc() system routine. Its bugs are notorious, but in short, there is a fixed limit on the number of Malloc's any one application can perform. In fact, I once caught a message on Compuserve claiming that even if you're just doing something like: while (1) { buf = Malloc(size); Mfree(buf); } then it _still_ stops giving you memory after a while. (I'd like someone to confirm this). At any rate, those are the two obstacles that come to my mind. Maybe with the new TOS, the Malloc problem will be fixed. But if you were to just dynamically Malloc sectors as they were needed, I don't think you can make it resettable, since TOS will zero out all of its ram when you reboot. -- - Jonathan A. Fischer, jafischer@lily.waterloo.edu ...{ihnp4,allegra,decvax,utzoo,utcsri}!watmath!lily!jafischer "Is your religion real when it costs you nothing and carries no risk?" - The Preacher at Arrakeen