Path: chuka.playstation.co.uk!news From: Philip Gooch Newsgroups: scee.yaroze.programming.codewarrior Subject: Re: MWDebugIO Date: Wed, 01 Jul 1998 16:00:35 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 31 Message-ID: <359A4F13.6927AD1A@easynet.co.uk> References: <359A3B82.2267A83D@easynet.co.uk> <359A43E3.CD8101E3@hinge.mistral.co.uk> NNTP-Posting-Host: 193.131.140.246 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) Craig Graham wrote: > Philip Gooch wrote: > > > But, I don't know how to free up this memory afterwards. Because it's > > not dynamically allocated, free(p) won't work, will it? Do I just set p > > to NULL? Have I answered my own question? > > To get back the memory used for TIM's you've loaded into VRAM already,what > you can do is organise all such 'disposable' TIM's to be AFTER your > code and other data. Then, you can re-initialise the malloc system after > loading > the TIM's to the VRAM so that you will get the memory back for use > at runtime... > > (yes, I'm aware that most people don't do this and put their graphics data > before > the code in memory - well, you don't get the memory back to the heap if you > do it that way) > Thanks Craig. And if storing my TIM as static data in an array (using Steve Dunn's bin2hex program), how can I free up the memory taken up by the array afterwards? Thanks in advance Phil