Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!chinet!mcdchg!clyde!bellcore!faline!thumper!ulysses!andante!mit-eddie!bloom-beacon!tut.cis.ohio-stat From: mwm@eris.UUCP Newsgroups: comp.sys.amiga.tech Subject: Re: Free memory available Message-ID: <10432@agate.BERKELEY.EDU> Date: 1 Jun 88 02:46:11 GMT Article-I.D.: agate.10432 References: <6743@cit-vax.Caltech.Edu> Sender: usenet@agate.BERKELEY.EDU Distribution: na Organization: Missionaria Phonibalonica Lines: 31 In article <6743@cit-vax.Caltech.Edu> glewis@cit-vax.UUCP (Glenn M. Lewis) writes: < What is the "acceptable" way to find out how much memory there is > 10; fast_free = AvailMem(MEMF_FAST) >> 10; give you the number of K free of each type of memory. However, the amount of free memory and the largest chunk you can allocmem are not the same. For instance, right now I've got 3.6 Meg free, but can't get a chunk bigger than 2 Meg. The problem is that free memory is at scattered locations through the memory spaces, but AllocMem returns contigious memory blocks. I've got a program (frags.c) that explains in gory detail how to walk the free memory list. You're welcome to a copy of that, and tweaking it to find the largest free chunk should be easy.