9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Douglas A. Gwyn" <DAGwyn@null.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] pascal, TeX
Date: Mon, 17 Dec 2001 10:14:41 +0000	[thread overview]
Message-ID: <3C1A4F75.B700F30F@null.net> (raw)
In-Reply-To: <9vdbj1$ehk$2@ctb-nnrp1.saix.net>

D De Villiers wrote:
> According to my knowledge - Java was the first language that implemented
> garbage collection...Neather C/C++ or Pascal (Delphi etc) have garbage
> collection and memory must be manually located/delocated etc.

Actually, garbage collection was implemented in some very
old languages such as LISP.

C++ does have what amounts to garbage collection plus other
programmer-controllable actions in its object destructors,
which are automatically invoked when objects go out of scope.

C has had garbage collectors implemented for it; for example,
somebody (I think it was Rob) made heavy use of gcalloc() in
the Blit family, both in the terminal's operating system and
in application programs.

The basic problem with garbage collection in C is nt in doing
it, but in doing it efficiently.  The main reason it is hard
is that C has excellent support for pointer arithmetic, so a
program can manufacture valid pointers in ways that are hard
to track, and a garbage collector can't (with a reasonable
amount of work) be sure when there is no pointer remaining
that could be used to access an object.  Nevertheless, there
have been some clever "good enough" garbage collectors
designed for use with C.  It's not obvious that they are
needed, since C has a long heritage of the programmer making
explicit calls to free() to deallocate dynamic objects.


  reply	other threads:[~2001-12-17 10:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-13 19:02 forsyth
2001-12-14 10:14 ` Thomas Bushnell, BSG
2001-12-14 17:37 ` D De Villiers
2001-12-17 10:14   ` Douglas A. Gwyn [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-12-18  0:37 okamoto
2001-12-17  8:29 Fco.J.Ballesteros
2001-12-14 18:03 rob pike
2001-12-14 17:43 ` Lucio De Re
2001-12-14 18:09 ` Boyd Roberts
2001-12-14 18:22 ` Andrey A Mirtchovski
2001-12-16 19:41 ` Andrew Simmons
2001-12-17 10:16   ` Thomas Bushnell, BSG
2001-12-17 10:14 ` Douglas A. Gwyn
2001-12-17 10:16 ` Wladimir Mutel
2001-12-14 17:59 bwc
2001-12-14 17:40 forsyth
2001-12-17 10:15 ` Ralph Corderoy
2001-12-14  1:42 geoff
2001-12-13 17:38 erik quanstrom
2001-12-13 17:51 ` Howard Trickey
2001-12-14 10:15   ` Thomas Bushnell, BSG
2001-12-13 17:56 ` George Michaelson
2001-12-13 18:02   ` Alexander Viro
2001-12-13 18:09     ` George Michaelson
2001-12-13 18:11   ` Boyd Roberts
2001-12-13 18:18     ` George Michaelson
2001-12-13 18:21     ` Alexander Viro
2001-12-14  7:19       ` paurea
2001-12-14  8:07         ` Steve Kilbane
2001-12-14 17:04         ` Douglas A. Gwyn
2001-12-13 18:55     ` Martin Harriss
2001-12-13 21:20       ` Steve Kilbane
2001-12-14 10:15     ` Douglas A. Gwyn
2001-12-18  9:47     ` Chet Ramey
2001-12-14  0:39   ` Dan Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C1A4F75.B700F30F@null.net \
    --to=dagwyn@null.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).