Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!ucbvax!POSTGRES.BERKELEY.EDU!dillon From: dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga.tech Subject: Re: Memory Allocation Question Message-ID: <8812050614.AA04773@postgres.Berkeley.EDU> Date: 5 Dec 88 06:14:53 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 38 :andrew@bhpese.oz.au (Andrew Steele): :This is a quick question. :If in a program you have the following statement : : : ptr = AllocMem( 100L , MEMF_FAST ); : :how will the Amiga handle the case when the is no fast ram left ? If you specify MEMF_FAST, and not enough fast memory exists, NULL will be returned. Normally, I do this: ptr = AllocMem(, MEMF_PUBLIC); OR ptr = AllocMem( , 0); OR Here, since you are not specifying any particular type of memory, the system first checks FAST memory, and if not enough exists it then tries to allocate from CHIP memory. It doesn't really matter whether MEMF_PUBLIC is specified or not (it is unclear when one should specify it and when one should not, and the current OS does not care). >I would think that a lack of fast ram would cause chip ram to be allocated >but I can't find anywhere that explicitly says that this is the case. Only if you don't specify a specific type of memory as I did in my example. . o . o . // O -Matt\|/ * "The trajectory failed due to an ill-considered rounding of the floating point quantity by the compiler"