Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Spellweaver Newsgroups: scea.yaroze.programming.codewarrior Subject: Re: Initializing the heap Date: Fri, 31 Oct 1997 17:23:04 -0600 Organization: The Implementor Lines: 19 Message-ID: <345A6858.13EC@ix.netcom.com> References: <01bce566$fdb8c1a0$a5bf43ce@wkwerner> <34596659.40D5@charlie.cns.iit.edu> <01bce5de$a390af80$6fbf43ce@wkwerner> Reply-To: spelwevr@ix.netcom.com NNTP-Posting-Host: tiphares.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.02 (WinNT; I) Quoth Wayne K. Werner: [ ... ] > Yeah, but I still find it problematic to init heap in the > source. Heap is a feature of the language itself. I think > maybe GNU should be "upgraded" to handle this issue correctly, > and CW shouldn't be "downgraded" to be compatible. Then > compiler specific issues of heap inititialization would > be no issues at all. Actually, C proper has no heap. K&R state that "The language does not define any storage allocation facility other than static definition and the stack [...]; there is no heap or garbage collection." Also, although malloc() et al are defined in the ANSI C library, heap initialization functions are not. Since heap management and initialization are language extensions, a compiler can manage this however it wants. Having to explicitly initialize the heap may be annoying, but it is legal, and it also allows one more piece of baggage to be left behind in programs that do not require a heap.