Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!mp1u+ From: mp1u+@andrew.cmu.edu (Michael Portuesi) Newsgroups: comp.sys.amiga.tech Subject: Re: CloseFonts() problems Message-ID: Date: 29 Dec 88 22:08:21 GMT References: <3599@tekig5.PEN.TEK.COM>, <10097@well.UUCP> Organization: Carnegie Mellon Lines: 29 In-Reply-To: <10097@well.UUCP> ewhac@well.UUCP (Leo L. Schwab) writes: > You can force the system to purge all loaded fonts and libraries > that are not currently in use by trying to allocate four gigabytes of RAM: > > AllocMem (4000000000L, NULL); > > This will always fail (unless you actually happen to *have* four > gigabytes of RAM hanging around (or if AmigaDOS/Kickstart ever goes > virtual)). Which sounds to me like a good reason you might not want to pull such a trick -- if Amigos (how's that for a name for the Amiga operating system) ever does go virtual, the call might actually succeed. You might want to put in a sanity check so that if the call *does* succeed, the memory is deallocated. Perhaps better would be an Exec call to automatically flush non-used libraries and fonts from memory. Does one exist? Is it a good idea for random programs to be flushing things that might be better off cached? --M -- Michael Portuesi / Information Technology Center / Carnegie Mellon University INET: mp1u+@andrew.cmu.edu / BITNET: mp1u+%andrew.cmu.edu@cmccvb UUCP: ...harvard!andrew.cmu.edu!mp1u+ "I'm very sorry, Master, but that WAS the backup system" -- Slave