Path: chuka.playstation.co.uk!scea!wal From: wal@blarg.net (wayne a. lee) Newsgroups: scea.yaroze.programming.codewarrior Subject: Re: Initializing the heap Date: Mon, 03 Nov 1997 21:05:09 -0800 Organization: SCEA News Server Lines: 14 Message-ID: References: <01bce566$fdb8c1a0$a5bf43ce@wkwerner> <34596659.40D5@charlie.cns.iit.edu> <01bce5de$a390af80$6fbf43ce@wkwerner> <3459c0fd.1431258@news.playstation.co.uk> <01bce639$f3382a80$78bf43ce@wkwerner> <01bce8db$44ff5fc0$6ebf43ce@wkwerner> NNTP-Posting-Host: mg134-237.ricochet.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Yet Another NewsWatcher 2.4.0 Reading the library docs... I gues InitHeap() lets you put the heap any old place you want. And I think the docs say not to call InitHeap() more than once. So, maybe it's "for our own good"... and seems to have nothing to do with the Metrowerks environment at all. According to the docs, any program that uses malloc() needs to call InitHeap() first, so this must apply to GNU as well. I haven't looked into this, but it occurs to me that using the sample code in _psstart.c to init the heap could potentially cause overwriting of TMD data or whatever IF you decided to load such unallocated, hard-coded data *after* (i.e. in higher memory locations) the code, rather than before. -- wayne a. lee