Related articles |
---|
Re: gawk memory leak albaugh@agames.com (1997-04-03) |
Re: gawk memory leak stuart@cosc.canterbury.ac.nz (stuart(yeates)) (1997-04-06) |
Re: gawk memory leak bobduff@world.std.com (1997-04-06) |
Re: gawk memory leak max@gac.edu (Max Hailperin) (1997-04-06) |
Re: gawk memory leak hbaker@netcom.com (1997-04-07) |
Re: gawk memory leak cyber_surfer@wildcard.demon.co.uk (1997-04-07) |
Re: gawk memory leak bobduff@world.std.com (1997-04-07) |
Re: gawk memory leak clark@quarry.zk3.dec.com (1997-04-07) |
[5 later articles] |
From: | stuart <stuart@cosc.canterbury.ac.nz> (yeates) |
Newsgroups: | comp.compilers |
Date: | 6 Apr 1997 22:25:20 -0400 |
Organization: | Compilers Central |
Keywords: | storage, GC |
Mike Albaugh (albaugh@agames.com) wrote:
: I keep running into this sentiment. I'm definitely not
: "pro memory leaks", but I don't understand exactly what definition
: of the term makes it not apply to objects that are still "live"
: long after they are _usefully_ live, in garbage-collected systems.
: Sure, memory leaks are more _likely_ with rookies (or, mortals :-)
: doing malloc/free at a dizzying pace, but garbage collection _per_se_
: does not solve the base problem of not having a handle (pun intended)
: on the useful life of your objects. Unless there is something major
: I'm missing, I'm afraid I'll continue to view garbage collection
: in the "Not _much_ Spam in it" category :-)
In a garbage collected language, it's the responsibility of each
module to maintain It's data structures and arrange for them to
only contain those objects which that module needs. when an object
is no longer needed locally, It's local references are extingished
(deleted, copied over, popped of the stack, etc).
In a non-garbage collected language, in addition to determining doing
this, each module must be aware of whether any other (including those
which haven't been written yet) also accesses the object, and if not
free it.
Garbage collection thus reduces "the base problem of not having a
handle on the useful life of your objects" from a global one to a
local one.
stuart
--
stuart yeates <stuart@cosc.canterbury.ac.nz> aka `loam'
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.