home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!cs.utexas.edu!uwm.edu!ee!bloc1469
- From: bloc1469@ee.ee.uwm.edu (Gregory R Block)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Flushing Devices; C= doco (mutter!)
- Date: 9 Jan 1993 08:26:40 GMT
- Organization: Electrical Engineering Dept. University of Wisconsin - Milwaukee
- Lines: 35
- Message-ID: <1im280INN80o@uwm.edu>
- References: <1993Jan7.092127.13752@philips.oz.au> <1iia8tINNdeh@darkstar.UCSC.EDU> <crystal.726454269@glia>
- NNTP-Posting-Host: 129.89.2.33
-
- In article <crystal.726454269@glia> crystal@glia.biostr.washington.edu (Crystal) writes:
- >Ok, so, other than "avail flush", what other ways are there? I want to
- >recover as much as I can from those programs that don't clean up after
- >themselves.
-
- This is the thing, you don't seem to understand how the system of
- libraries seems to work.
-
- When AllocMem is called, the system checks the free lists of memory to
- see if there is enough. If there isn't, it does something unusual:
-
- It goes through everything, and tells each library, etc., to "expunge"
- itself. If it is still in use, it simply replies to the expunge request.
- If the library _ISN'T_ in use, it frees itself from memory, and the
- system goes on to the next library/etc.
-
- After it does this, it checks the free lists again. If it _STILL_
- fails, the call fails. Otherwise, the system gives you the memory.
-
- This has the advantage of preserving the amount of times a library is
- loaded from disk/wherever. It speeds up the system considerably when
- there is enough memory, and when memory gets low, the system
- automatically cleans up what isn't in use.
-
- You're worrying about a problem that doesn't exist, dear.
-
- Greg
-
-
-
- --
- (: (: (: (: Have you overdosed on smileys today? Why NOT!?! :) :) :) :)
- (: "Our father, who art in Iowa, Hollow be thy head, Thy ideas run :)
- (: Thy will be done, At Commodore as it is at Apple" -Dan Barrett :)
- (: (: (: (: (: (: (: (: (: (: (: (: () :) :) :) Wubba, the Dark Angel :)
-