Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c Subject: Re: Testing if a pointer is valid Date: Sat, 24 Sep 2011 09:01:37 +1200 Lines: 21 Message-ID: <9e4adhFunvU1@mid.individual.net> References: <1bipop9mo6.fsf@pfeifferfamily.net> <87r5382y6v.fsf@bazspaz.fatphil.org> <87obyb1uat.fsf@bazspaz.fatphil.org> <871uv71g7d.fsf@bazspaz.fatphil.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net gLZ4gUOpl+z3JGX5lz/+bgk1P3mK9y2p5KmcdFQFIEgtZSRRQX Cancel-Lock: sha1:P75MDPqGPHOfotA60nL2zF0/E3s= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:10806 On 09/24/11 08:49 AM, Malcolm McLean wrote: > On Sep 23, 9:02 pm, jacob navia wrote: >> >> You allocate stuff with gc_malloc() and never free it. That is all >> there is. I do not see why that is no longer 'C'. >> > gc_malloc() can't be implemented in standard C, and requires intimate > knowledge of the architecture to sweep for orphaned memory blocks and > add them to the free list. That's enught o classify it as an extension > rather than simply as a new function. There's also the practical > reason that memory allocation is very fundamental, it changes the way > most programs are written. I don't see why people get so hung up in garbage collection. The compiler I mainly use has shipped with a collector since the 90s and it is still a standard C compiler. If I want to use the collector, all I have to do is link it with my standard C executable. Does the act of linking a garbage collector somehow make my code non-standard? -- Ian Collins