Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!cbmvax!andy From: andy@cbmvax.UUCP Newsgroups: comp.sys.amiga Subject: Re: Disk cache Message-ID: <1965@cbmvax.cbmvax.cbm.UUCP> Date: Tue, 2-Jun-87 10:16:20 EDT Article-I.D.: cbmvax.1965 Posted: Tue Jun 2 10:16:20 1987 Date-Received: Thu, 4-Jun-87 06:04:28 EDT References: <333@rocky.STANFORD.EDU> Reply-To: andy@cbmvax.UUCP (Andy Finkel) Organization: Commodore Technology, West Chester, PA Lines: 34 In article <333@rocky.STANFORD.EDU> rokicki@rocky.STANFORD.EDU (Tomas Rokicki) writes: >Now that my hard disk is gone and I'm back to floppies, I've decided >I need a disk cache. A good one. One with the following features: > > - Uses *available memory* exclusively, from the end of the > free list to the front > - Intercepts AllocMem to invalidate some cache buffers This method sounds like a bad thing...you will have memory that isn't really free, and isn't really used. (tristate memory ?) Its usually dangerous to take control of memory allocation away from the OS. How about something like this instead...do a library (called memory.library or something) that keeps track of memory for the buffers. Give it at least 4 calls: AllocateBuffer, FreeBuffer, AvailBuffers, and Expunge (as the normal Expunge entry point). Expunge, when called causes the library to invalidate all buffers and throw them away. Exec will use this in a low memory situation. Then, to improve performance, fire up a task which uses the first 3 calls to give finer control. That task could be running at a fairly high priority, checking memory usage, and adding and/or subtracting buffers as memory requirements change. You could use AbsAllocate to make it use memory from the top down. > >-tom good luck, andy -- andy finkel {ihnp4|seismo|allegra}!cbmvax!andy Commodore/Amiga "An end is always a new beginning." - Captain Cloud Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors.