"Yair Lifshitz" <[EMAIL PROTECTED]> writes:
>
> On a different note, it is actually hard to decide which pointers can
> be compressed at the compilation level (without user intervention)
> seeing as some pointers are actually <8-byte aligned (i.e. char-s) and
> forward declarations can make it impossible to discover.

Sounds reasonable. But if you do it I would really recommend to implement
compiler support (or only use it with C++) so that the compiler always
handles it based on the type declaration. AmigaOS for historical reasons
(compatibility to BCPL[1]) had a similar type of special pointer (BPTRs) and
dealing with it in C with special access macros was always very painful.

-Andi

[1] BCPL was typeless, and to make x++ work correctly on a pointer
on a 32bit machine the pointers were always stored shifted down by 2 bits
in the BCPL compiler where originally parts of AmigaOS were written in.

Reply via email to