Article View: comp.sys.amiga.tech
Article #738Followup to Freeing memory on demand
From: Bryan Ford
Date: Fri, 04 Aug 1989 12:55
Date: Fri, 04 Aug 1989 12:55
30 lines
1703 bytes
1703 bytes
Just an idea that I thought I'd toss out...
The problem with using a fake library (via the Expunge function) to free
caches is that it can't be told exactly *how much* memory needs to be
freed. If I've got megabytes of caches, and a program needs only a few K,
I don't want to free the whole bit. Question: Does the memory allocator
always go through the entire library/device list before retrying the
allocation, or does it retry after each library node it calls, and stop
when it can get enough memory? If it stops after it gets enough, it might
be possible to make the fake Expunge function free a little memory (say one
cache), remove itself from the library list, and add itself back into the
end of the list. That way, if the memory allocator needed more memory, it
would find the library again, call it again, and the library would free
more memory.
Also, would it be good to SetFunction() the AllocMem() function? Does the
OS always (or at least usually) allocate memory through this entry point,
or does it call itself directly?
Thanks!
Bryan
--
_______________________________________
_/ Bryan Ford - bryan@geo-works.uucp \_
_/ ..!utah-cs!caeco!i-core!geo-works!bryan \_
/ ..!uunet!iconsys!caeco!i-core!geo-works!bryan \
\_____________Author: Chroma Paint______________/
Technical Details
Message-ID:
<2085.AA2085@geo-works>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!iconsys!caeco!i-core!geo-works!bryanShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!iconsys!caeco!i-core!geo-works!bryan From: bryan@geo-works.UUCP (Bryan Ford) Newsgroups: comp.sys.amiga.tech Subject: Followup to Freeing memory on demand Message-ID: <2085.AA2085@geo-works> Date: 4 Aug 89 12:55:06 GMT Followup-To: comp.sys.amiga.tech Lines: 30