home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psinntp!tfd!afp!gna!amipb.gna.org!amipb
- From: amipb@amipb.gna.org (Philippe Berard)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Flushing unused devices out of ram , how ?
- Distribution: world
- Message-ID: <amipb.067x@amipb.gna.org>
- X-NewsSoftware: GRn 1.16f (10.17.92) by Mike Schwartz & Michael B. Smith
- Date: 11 Jan 93 14:45:01 MET
- Organization: IWANIMA
- Lines: 21
-
- In article <1993Jan6.104949.20894@philips.oz.au> gduncan@philips.oz.au (Gary Duncan) writes:
- > Currently in a C-program I've done a :-
- > Execute ("Avail Flush >nil:", 0,0);
- >
- > which does the job but its a bit klugey.
- >
- > Why do I want to do this? Simply that if you open a device (for
- > the first time ) then close it, it hangs around unused in RAM
- > giving the impression of a memory leak.
-
- You must use an AllocMem(-1, MEMF_PUBLIC), this will flush all libraries
- and devices with an OpenCount set to 0.
-
- Sincerely,
- -- Philippe
-
- .----------------------------------------------------------------------------.
- | Philippe Berard (French Amiga User) | |
- | "They hold a cup of wisdom, | UseNet : amipb@amipb.gna.org |
- | But there is nothing within" (Kate Bush). | |
- `----------------------------------------------------------------------------'
-