delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/17/16:49:34

From: Hans-Juergen Boehm <boehm AT mti DOT sgi DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Boehm-Demers-Weiser Garbage Collector with DJGPP?
Date: Mon, 17 Mar 1997 12:02:19 -0800
Organization: Silicon Graphics Inc., Mountain View, CA
Lines: 43
Message-ID: <332DA34B.167E@mti.sgi.com>
References: <5g2tgq$35o_002 AT fmsc DOT com DOT au> <y6ypvx1t4to DOT fsf AT hydrogen DOT daimi DOT aau DOT dk>
NNTP-Posting-Host: hoh.mti.sgi.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Kristian Hogsberg Kristensen wrote:
> 
> I've managed to get it working but that was an
> earlier version that hadn't yet been ported to DJGPP.
> I had a look at config.h from version 4.10 that seem
> to have been ported to DJGPP, but it says (line 513)
> 
>         #define STACKBOTTOM ((ptr_t)(0x00080000))
> 
> or something like that and that wasn't what I came
> up with when porting it...

The most recent version of the garbage collector is in

http://reality.sgi.com/employees/boehm_mti/gc_source/gc4.11.tar.gz

It contains a djgpp-specific typo, which you will need to fix
(a typedef for caddr_t is backwards.  The p[roblem will be pretty
obvious.)

I'm not a djgpp user, so I'm not sure about the STACKBOTTOM
and DATASTART definitions.  My interpretation based on what you
posted, and what I vaguely remember from other complaints, is that
there may be no really correct way to define STACKBOTTOM.  In that
case you're stuck with setting GC_stackbottom to the address of a local
inside main, and making sure that main declares no variables that point
to the collected heap.  (This is always possible by having main be a
dummy function that simply calls another function to get its work done.)

I wouldn't be very concerned about DATASTART being set a few hundred
bytes to low.  So long as the bytes in between are addressable, it
shouldn't be an issue.

If there is some agreement as to what the definitions should be, I'd be
happy to fix 4.12.  But I do have vague recollections of contradictory
fixes in the past, suggesting that what works for one program may not be
universally correct.

Hans

-- 
Hans-Juergen Boehm
boehm AT mti DOT sgi DOT com

- Raw text -


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