www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/15/19:29:20

From: Kristian Hogsberg Kristensen <hogsberg AT hydrogen DOT daimi DOT aau DOT dk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Boehm-Demers-Weiser Garbage Collector with DJGPP?
Date: 15 Mar 1997 18:58:43 +0100
Organization: DAIMI, Computer Science Dept. of Aarhus Univ.
Lines: 37
Message-ID: <y6ypvx1t4to.fsf@hydrogen.daimi.aau.dk>
References: <5g2tgq$35o_002 AT fmsc DOT com DOT au>
NNTP-Posting-Host: hydrogen.daimi.aau.dk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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. In the startup code the 
stack memory is allocated with sbrk just after the
__Go32_Info_Block is allocated (also with sbrk) and
the return value from this call is the lowest byte
on the stack (as needed by the collector). However
I couldn't find a pretty way of getting this address
so i came up with:

	#define STACKBOTTOM ((ptr_t)((char*)&__Go32_Info_Block \
	   +__Go32_Info_Block.size_of_this_structure_in_bytes))

However this doesn't account for any alignment sbrk might
perform. Besides the DATASTART #define'd in config.h line 512
says

 	#define DATASTART ((ptr_t)(&etext))

but since the data segment is aligned on a 0x200-byte boundary

 	#define DATASTART ((ptr_t)(((char*)&etext+0x1ff)&0xfffffe00))

would probably be better. This works for me but it might
not be the best way to do it. If you cant get it working
please mail me and I'll send you my working version.

regards,
Kristian Hogsberg, hogsberg AT daimi DOT aau DOT dk


- Raw text -


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