www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/05/28/21:50:51

Date: Tue, 28 May 1996 20:49:25 -0500 (CDT)
Message-Id: <199605290149.UAA04757@orion.math.uiuc.edu>
From: Dan Grayson <dan AT math DOT uiuc DOT edu>
To: djgpp-workers AT delorie DOT com
Subject: djgpp and garbage collection
Reply-to: drg AT uiuc DOT edu

I've been using Boehm's garbage collector for C, gc 4.5, and have gotten it
to work with djgpp.  (It's a plug-in replacement for malloc() (!!) and is
available freely at /ftp AT parcftp DOT xerox DOT com:/pub/gc).

One thing it needs to guess at is the location of the bottom of the stack.
No guessing gets it exactly right.  To provide this I added a line to crt0.s:

	je	no_memory
	addl	__stklen, %eax
-->	movl	%eax, ___djgpp_stackbottom
	movw	%ds, %dx		/* set stack */
	movw	%dx, %ss

(I also defined space for the variable elsewhere.)  It works fine.  Perhaps
you will consider adding this or something like it to a future release.


- Raw text -


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