[m-dev.] Re: pragma fact_table

Zoltan Somogyi zs at cs.mu.oz.au
Wed Feb 19 14:14:53 AEDT 1997


David wrote:
> For the case when index is a pointer, is it guaranteed to be aligned
> on a word boundary (i.e. so that at least the 2 least significant bits
> are 0)?  The pointer is pointing to a struct defined as a global C
> variable, not to something on the Mercury heap.

The answer is yes on RISC platforms (which means every platform we currently
support except the x86). On x86 the answer is in theory compiler dependent,
but I would be very surprised to find any compiler designed for 386 and up
that does not guarantee this alignment, since access to non-aligned structures
is significantly slower.

Zoltan.



More information about the developers mailing list