<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
For the vast majority of platforms:<BR>
<BR>
<BR>
RTMachine.PointerAlignment = BYTESIZE(INTEGER).<BR>
<BR>
<BR>
except 1 for NT386, 2 for M68K (dead).<BR>
<BR>
<BR>
PointerAlignment = BYTESIZE(INTEGER);<BR> (* The C compiler allocates all pointers on 'PointerAlignment'-byte<BR> boundaries. The garbage collector scans thread stacks, but only<BR> looks at these possible pointer locations. Setting this value<BR> smaller than is needed will only make your system run slower.<BR> Setting it too large will cause the collector to collect storage<BR> that is not free. *)<BR><BR>
<BR>
I suggest this is not exactly true.<BR>
1) Of what relevance is the C compiler? vs. the Modula-3 compiler.<BR>
2) We really think the number is 1 for NT386? <BR>
<BR>
I understand I could say:<BR>
void F(void* traced)<BR>
{<BR>
#pragma pack(1)<BR>
struct { char a; void* p} = {0, traced};<BR>
}<BR>
<BR>
but<BR>
1) That seems highly unlikely.<BR>
2) Do we really anticipate the case where C code is the *only* holder of a traced reference?<BR>
And more so, it wasn't a parameter to the C code -- the location of parameters is controlled by Modula-3, assuming a pointer-aligned stack.<BR>
3) Can't we know/assume/verify that Modula-3 code only stores pointers at more aligned location?<BR>
<BR>
<BR>
My real goal is to make there only be one RTMachine for systems that don't have stack walkers.<BR>
Leave SOLgnu/SOLsun alone.<BR>
(Later on implement stack walking for many platforms via libunwind.)<BR>
<BR>
<BR>
There are I believe only two differences to iron out. Allocation size (8K vs. 64K) and PointerAlignment (1 vs. BYTESIZE(INTEGER)).<BR>
There is a reason for NT to be 64K allocation size -- that is what VirtualAlloc uses.<BR>
I can test 64K on others.<BR>
Historically smaller is probably more efficient.<BR>
These days larger but not *too* large is probably more efficient.<BR>
64K should work fine on all platforms. Heck, even something larger like 1MB is probably good.<BR>
I'll test out 64K.<BR>
<BR>
<BR>
Can/should we have "paranoidgc" imply PointerAlignment = 1, and report whenever a pointer is found at a location with alignment less than BYTESIZE(pointer)?<BR>
<BR>
<BR>
A form of this is reasonable today, right? If PointerAligment = 1, I can have it report any found at less than BYTESIZE(pointer), test it a while, if none found, elevate NT386 to that value?<BR>
If any found, that'll help educate me/us on why it is 1, and maybe how to change it, or why leave it alone.<BR>
<BR>
<BR>
- Jay<BR>
<BR> </body>
</html>