www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/29/00:26:47

From: Tudor <tudor AT cam DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: windows <-> cwsdpmi
Date: Sat, 28 Dec 1996 20:41:20 -0800
Organization: Communications Accesibles Montreal
Lines: 44
Message-ID: <32C5F670.191C@cam.org>
References: <851364688 DOT 618879 DOT 0 AT abwillms DOT demon DOT co DOT uk> <59mpup$csp AT vidar DOT diku DOT dk>
Reply-To: tudor AT cam DOT org
NNTP-Posting-Host: dynppp-96.hip.cam.org
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Morten Welinder wrote:
> 
> "Alaric B. Williams" <alaric AT abwillms DOT demon DOT co DOT uk> writes:
> 
> >Conservative GC can be used in C. It works like so:
> 
> You cannot garbage collect in C unless you restrict the class
> of valid programs.
> 
> Consider:
> 
> -----------------------------------------------------------------------------
> m = malloc (...);
> <fill something into m's data area>
> <print m's address to a file, possibly using fprintf's %p>
> m = 0;
> ...
> <let garbage collection happen here>
> ...
> <reread m's address>
> <access m's data area>
> -----------------------------------------------------------------------------
> 
> There is no way that the garbage collector could know that m's data
> area was pointed to by something in a file.
> 
> But all this should not be taken to mean that a garbage collector
> used in connection with C can not be useful.  This is just theory.
> 
> Morten
not necessarely.I got a file on my hard that implements a garbage
collector in c++;it automatically deallocates an object when it isn't
pointed at anymore.I got it from the "byte" site,in the archives,on the
oldest '95 entry.
-- 
tudor 'at' cam 'dot' org
http://www.cam.org/~tudor

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d-(--) s(-):(+) a? C+ UL>++++ P L>+++++ E- W++ N o K---(----) w---
O---- M-- V-? PS+++ PE Y PGP t+ 5-- X+++>++++ R tv b+ DI D+ G e->++
h>++ r- y>+++++ 
------END GEEK CODE BLOCK------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019