Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: "Wayne K. Werner" Newsgroups: scea.yaroze.programming.codewarrior Subject: Re: Problems with CW 2 install Date: 2 Nov 1997 17:59:20 GMT Organization: WermX Software Lines: 25 Message-ID: <01bce7b8$9f36d1e0$6ebf43ce@wkwerner> References: <3457A77B.41C6@san.rr.com> NNTP-Posting-Host: port10.con2.com X-Newsreader: Microsoft Internet News 4.70.1161 Wayne A. Lee wrote: > Hm, that's interesting (InitHeap() must be called from main()). Is it OK to > call InitHeap() from another function called by main(), or does it have to > be from main() itself (since I'm guessing the limitation has something to > do with the stack)? I want to hide the ugliness with a util function, but > if not, I guess I can use a macro instead. Wayne, Don't worry, it has nothing to do with the stack. Call it anywhere you want, just make sure you call it *before* using malloc or any of the other related functions. If you don't use dynamic allocation, there is no need to call it at all. Hiding the call inside of an init function is a good idea to me. Helps to keep the logic in main clear. Wayne K. Werner wkwerner@con2.com