Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #23481

Re: Strange C developments

From jacob navia <jacob@spamsink.net>
Newsgroups comp.lang.c
Subject Re: Strange C developments
Date 2012-07-21 13:01 +0200
Organization lccwin
Message-ID <jue270$9aj$1@speranza.aioe.org> (permalink)
References <juchoa$974$1@speranza.aioe.org> <judtk6$uen$1@speranza.aioe.org> <judvvo$3r7$1@speranza.aioe.org>

Show all headers | View raw


Le 21/07/12 12:23, Quentin Pope a écrit :
> On Sat, 21 Jul 2012 11:43:36 +0200, jacob navia wrote:
>> Le 20/07/12 23:14, Jase Schick a écrit :
>>> Hi Can anyone explain why C has added support for pthreads, while NOT
>>> adding support for garbage collection? Convenient memory management
>>> would be a much greater enhancement than replicating a perfectly good
>>> existing library it seems to me.
>>>
>>> Jase
>>>
>> The lcc-win compiler offers a garbage collector (Boehm's) in its
>> standard distribution. It is a very useful feature, used for instance in
>> the debugger of lcc-win, in the IDE and several other applications. Of
>> course it is used by many of the people that have downloaded lcc-win
>> (more than 1 million)
>
> Do you never get tired of spamming this group with advertising for your
> compiler?
>
> Adding garbage collection would break a large amount of existing code.
>

To port existing code to a GC environment you do not need to change a 
single line. Just define malloc as gc_malloc and define free as a noop.


> Often the bottom couple of bits of pointers to memory with known
> alignment properties will be used to store information (the pointer than
> being and'd with ~0x3ul or similar prior to dereferencing).
>

??? That is not the case with the GC used by lcc-win.

> Many code protection methods rely on storing pointers xor'd with an
> obfuscating mask. GCs are not sophisticated enough to track such pointers.
>

Yes, that kind of code shouldn't be used with a GC.

> And what is the gain?

The gain is that instead of loosing endless hours tracking that dangling
pointer in the debugger you can concentrate on your application instead.


> With careful programming, there is no need
> whatsoever for this stupid overhead.

You fail to mention "With careful programming and not making any 
mistake. NEVER. A single moment of inattention and you are screwed.


Leave it for the kiddies programming
> JAVA.
>

JAVA, Lisp, C++, C, all the languages that can be used ith a collector.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Strange C developments Jase Schick <nospam@nospam.com> - 2012-07-20 21:14 +0000
  Re: Strange C developments Les Cargill <lcargill99@comcast.com> - 2012-07-20 18:03 -0500
  Re: Strange C developments "christian.bau" <christian.bau@cbau.wanadoo.co.uk> - 2012-07-20 16:03 -0700
    Re: Strange C developments Tim Rentsch <txr@alumni.caltech.edu> - 2012-07-21 15:11 -0700
    Re: Strange C developments tom st denis <tom@iahu.ca> - 2012-08-02 06:08 -0700
      Re: Strange C developments Jens Gustedt <jens.gustedt@loria.fr> - 2012-08-02 21:23 +0200
        Re: Strange C developments tom st denis <tom@iahu.ca> - 2012-08-03 04:13 -0700
          Re: Strange C developments Noob <root@127.0.0.1> - 2012-08-03 13:19 +0200
          Re: Strange C developments Anders Wegge Keller <wegge@wegge.dk> - 2012-08-03 13:31 +0200
          Re: Strange C developments Jens Gustedt <jens.gustedt@loria.fr> - 2012-08-03 23:47 +0200
      Re: Strange C developments gwowen <gwowen@gmail.com> - 2012-08-03 02:20 -0700
  Re: Strange C developments Rui Maciel <rui.maciel@gmail.com> - 2012-07-21 01:25 +0100
  Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-20 19:38 -0500
  Re: Strange C developments Nobody <nobody@nowhere.com> - 2012-07-21 10:32 +0100
    Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-21 09:31 -0500
      Re: Strange C developments Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-07-21 17:38 +0100
        Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-21 12:58 -0500
        Re: Strange C developments Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-07-21 11:42 -0700
          Re: Strange C developments Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-07-21 20:13 +0100
            Re: Strange C developments Nobody <nobody@nowhere.com> - 2012-07-21 20:48 +0100
              Re: Strange C developments Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-07-21 23:32 +0100
  Re: Strange C developments jacob navia <jacob@spamsink.net> - 2012-07-21 11:43 +0200
    Re: Strange C developments Quentin Pope <qp19433@hotmail.NOSPAM.com> - 2012-07-21 10:23 +0000
      Re: Strange C developments jacob navia <jacob@spamsink.net> - 2012-07-21 13:01 +0200
        Re: Strange C developments gordonb.y4pdz@burditt.org (Gordon Burditt) - 2012-07-21 08:57 -0500
          Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-21 10:40 -0500
          Re: Strange C developments jacob navia <jacob@spamsink.net> - 2012-07-21 19:03 +0200
            Re: Strange C developments gordonb.5rhpu@burditt.org (Gordon Burditt) - 2012-07-22 02:08 -0500
              Re: Strange C developments jacob navia <jacob@spamsink.net> - 2012-07-22 12:32 +0200
                Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-22 08:26 -0500
            Re: Strange C developments Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-07-24 01:23 -0700
              Re: Strange C developments Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-07-24 05:36 -0700
                Re: Strange C developments Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-07-30 02:04 -0700
              Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-24 09:55 -0500
                Re: Strange C developments 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-02 06:44 -0700
                Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-08-03 08:48 -0500
          Re: Strange C developments jacob navia <jacob@spamsink.net> - 2012-07-21 19:06 +0200
            Re: Strange C developments gordonb.ibds9@burditt.org (Gordon Burditt) - 2012-07-22 02:28 -0500
              Re: Strange C developments jacob navia <jacob@spamsink.net> - 2012-07-22 12:30 +0200
              Re: Strange C developments Philip Lantz <prl@canterey.us> - 2012-07-24 00:58 -0700
        Re: Strange C developments Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-07-24 01:13 -0700
      Re: Strange C developments Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-07-21 05:44 -0700
        Re: Strange C developments Tim Rentsch <txr@alumni.caltech.edu> - 2012-07-21 15:31 -0700
          Re: Strange C developments Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-07-21 16:59 -0700
            Re: Strange C developments Tim Rentsch <txr@alumni.caltech.edu> - 2012-07-21 23:46 -0700
              Re: Strange C developments "io_x" <a@b.c.invalid> - 2012-07-22 10:37 +0200
                Re: Strange C developments Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-07-22 03:28 -0700
                Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-22 09:05 -0500
                Re: Strange C developments Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-07-24 02:10 -0700
                Re: Strange C developments "io_x" <a@b.c.invalid> - 2012-07-27 20:47 +0200
                Re: Strange C developments Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-07-30 02:09 -0700
                Re: Strange C developments "BartC" <bc@freeuk.com> - 2012-07-30 13:05 +0100
                Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-08-03 10:45 -0500
                Re: Strange C developments "io_x" <a@b.c.invalid> - 2012-07-30 16:52 +0200
                Re: Strange C developments "io_x" <a@b.c.invalid> - 2012-07-30 18:26 +0200
                Re: Strange C developments Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-08-03 12:12 -0700
                Re: Strange C developments "BartC" <bc@freeuk.com> - 2012-08-04 12:18 +0100
                Re: Strange C developments Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-08-10 09:50 +0300
                Re: Strange C developments Tim Rentsch <txr@alumni.caltech.edu> - 2012-09-07 11:19 -0700
                Re: Strange C developments "io_x" <a@b.c.invalid> - 2012-09-09 12:06 +0200
                Re: Strange C developments Kaz Kylheku <kaz@kylheku.com> - 2012-09-09 05:25 +0000
          Re: Strange C developments Melzzzzz <mel@zzzzz.com> - 2012-07-22 02:48 +0200
          Re: Strange C developments William Ahern <william@wilbur.25thandClement.com> - 2012-07-21 21:45 -0700
            Re: Strange C developments Tim Rentsch <txr@alumni.caltech.edu> - 2012-07-22 02:40 -0700
              Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-22 10:38 -0500
          Re: Strange C developments William Ahern <william@wilbur.25thandClement.com> - 2012-07-21 22:38 -0700
            Re: Strange C developments jacob navia <jacob@spamsink.net> - 2012-07-22 08:43 +0200
            Re: Strange C developments "BartC" <bc@freeuk.com> - 2012-07-22 11:24 +0100
              Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-08-03 09:09 -0500
                Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-08-03 16:54 -0500
          Re: Strange C developments Tim Rentsch <txr@alumni.caltech.edu> - 2012-07-21 23:16 -0700
            Re: Strange C developments Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-07-22 17:50 +0300
              Re: Strange C developments BGB <cr88192@hotmail.com> - 2012-07-22 11:27 -0500
                Re: Strange C developments Ike Naar <ike@iceland.freeshell.org> - 2012-07-22 20:55 +0000
                Re: Strange C developments Philip Lantz <prl@canterey.us> - 2012-07-24 00:56 -0700
                Re: Strange C developments Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-07-24 01:57 -0700
              Re: Strange C developments Tim Rentsch <txr@alumni.caltech.edu> - 2012-09-07 11:20 -0700
      Re: Strange C developments Tim Rentsch <txr@alumni.caltech.edu> - 2012-07-21 15:13 -0700
  Re: Strange C developments John Bode <jfbode1029@gmail.com> - 2012-07-23 14:59 -0700

csiph-web