Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!tektronix!reed!psu-cs!bartonr From: bartonr@psu-cs.UUCP (Robert Barton) Newsgroups: comp.sys.amiga.tech Subject: Introduction to comp.sys.amiga.tech Message-ID: <1739@psu-cs.UUCP> Date: 7 Mar 89 03:04:54 GMT Reply-To: bartonr@psu-cs.UUCP (Robert Barton) Organization: Dept. of Computer Science, Portland State University; Portland OR Lines: 20 > # 4 : The Amiga's custom graphics and sound chips can only access the > first 512K of memory (slow or chip memory). Therefore, anything that > these chips use must be in the first 512K of memory. This includes > Window, Gadget and BitMap structures that Intuition uses. To make sure > that you get chip memory do add the MEMF_CHIP constant to your call to > malloc: > > foobar *milkchocolate; > milkchocolate = ( foobar * ) AllocMem (sizeof(foobar), MEMF_CHIP); > > Then copy your data to the memory pointed to by "milkchocolate". > > Edwin Hoogerbeets > uunet!utai!utcsri!hcr!edwin This is a new one to me. When the OpenWindow() routine allocates the memory for the Window structure it asks for MEMF_CLEAR | MEMF_PUBLIC. Same with OpenScreen() when allocating a Screen or RasInfo structure. Since a Screen contains a ViewPort, a RastPort, a BitMap, and a LayerInfo this implies that none of these structures need to be in chip memory either.