[M3devel] RTMachine.PointerAlignment = 1 on NT?

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Wed Apr 7 20:56:54 CEST 2010


On Mon, Apr 05, 2010 at 11:41:10AM +0000, Jay K wrote:
> 
> For the vast majority of platforms:
> 
>  
> 
>  
> 
> RTMachine.PointerAlignment = BYTESIZE(INTEGER).
> 
>  
> 
>  
> 
> except 1 for NT386, 2 for M68K (dead).
> 
>  
> 
>  
> 
>   PointerAlignment = BYTESIZE(INTEGER);
>   (* The C compiler allocates all pointers on 'PointerAlignment'-byte
>      boundaries. The garbage collector scans thread stacks, but only
>      looks at these possible pointer locations. Setting this value
>      smaller than is needed will only make your system run slower.
>      Setting it too large will cause the collector to collect storage
>      that is not free. *)
> 
> 
>  
> 
> I suggest this is not exactly true.
> 
>   1) Of what relevance is the C compiler?  vs. the Modula-3 compiler.


The C compiler is not that relevant.  What is relevant is possible other 
languages that might want to share a garbage collector.

I dream of the day when multilanguage programming can be done cleanly 
for other than the malloc/free kinds of languages.  

The one big problem with garbage-collected languages at the moment is 
that they interwork very poorly because they have incompatible storage 
layouts.

Let's not make it harder than necessary.

As far as I know, most allocate pointers on pointer-sized boundaries.
But pointers may point into objects as well as to them, not necessarily 
at nice boundaries.

-- hendrik



More information about the M3devel mailing list