Path: chuka.playstation.co.uk!news From: "Jan-Lieuwe Koopmans" Newsgroups: scee.yaroze.beginners Subject: Re: Memory usage - Help! Date: Fri, 5 Jun 1998 00:47:10 +0200 Organization: PlayStation Net Yaroze (SCEE) Lines: 38 Message-ID: <6l784e$6o20@chuka.playstation.co.uk> References: <01bccdee$cf4753c0$6e3863c3@default> NNTP-Posting-Host: amf0541.wxs.nl X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 >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