Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: jamin1@psu.edu (Jamin Frederick) Newsgroups: scee.yaroze.beginners Subject: Re: Memory usage - Help! Date: Mon, 08 Jun 1998 23:48:29 GMT Organization: SCEA News Server Lines: 48 Message-ID: <357c782e.24060827@news.scea.sony.com> References: <01bccdee$cf4753c0$6e3863c3@default> <6l784e$6o20@chuka.playstation.co.uk> Reply-To: jamin1@psu.edu NNTP-Posting-Host: MAXWELL.hq.ensco.com X-Newsreader: Forte Free Agent 1.11/32.235 Actually, sometimes you NEED that stuff kept in memory -- pixel-by-pixel collision detection for instance... Jamin On Fri, 5 Jun 1998 00:47:10 +0200, "Jan-Lieuwe Koopmans" wrote: >>Hi, >> >>I'm a bit confused about how memory usage works. >>Ok, I understand you have main RAM, VRAM and SRAM. I also understand you >>can't get at the VRAM or SRAM directly. >> >>My problem is with the following: Say you have 1/2Mb of textures and 1/2Mb >>of sound data. These would fit into VRAM and SRAM respectively with no need >>to keep copies in main memory. However, as I understand it, you have to >>upload them to main memory and then have your code copy them to VRAM/SRAM. >>So that's 1Mb of main memory taken up, used only to store (very) temporary >>copies of your data. This seems like a bit of a waste of a pretty scarce >>resource. >> >>Have I gone wrong somewhere, or is that right? >> > > >Yeah, you're right about that. You can re-use this memory after copying >things to VRAM or SRAM (unless you will overwrite it in VRAM later on and >want to be able to copy it again). > >If you don't want to spoil memory like that, then use realtime (down)loading >in your program instead (and allocating memory dynamically using InitHeap() >and malloc()). I didn't try this yet (I'm a beginner as well ;-), but I've >seen examples of it (written using CodeWarrior). > >I don't know if this is also possible using SIOCONS; maybe someone else can >fill me in... > >Good luck! > > >Greets, > >Jan-Lieuwe > >