Path: utzoo!attcan!uunet!samsung!emory!mephisto!udel!new From: new@udel.edu (Darren New) Newsgroups: comp.sys.amiga.tech Subject: Re: SetFunction and expunging libraries Message-ID: <10869@nigel.udel.EDU> Date: 12 Feb 90 18:34:05 GMT References: <551@mpirbn.UUCP> Sender: usenet@udel.EDU Reply-To: new@udel.edu (Darren New) Distribution: comp Organization: University of Delaware Lines: 23 In article deven@rpi.edu (Deven T. Corzine) writes: >On a more serious note, can you legitimately have a library which >refuses to expunge itself? That is, return some value from the >Expunge routine meaning "No." Now, this may sound useless, but I do >have a use in mind; I want a library that will be open, but which can >find out if the system is in need of memory, so it can free buffers, >caches, and the like. Yes. The Expunge() routine just returns zero and Exec does not free anything. (From memory, with salt). This is needed because a library may get Expunge()d while still open! Your Expunge routine must check that the open count is zero before freeing anything. As far as the low memory stuff goes, it's been done. Check out the ASDG LowMem server, which is exactly as you describe. You set up a port and open the library. When memory gets low, the library sends you a message. A copy is available somewhere in the FAM program (probably the binaries) which should be coming to a comp.binaries.amiga posting near you. (It's already been sent and is just waiting for distribution.) Please don't come out with yet another low-memory thing. Keep to the one freely-distributable server and all will be happy. I can email you the thing (docs and all) is you need it in a hurry. -- Darren