Are D classes proper reference types?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Jun 25 20:22:24 UTC 2021


On Friday, 25 June 2021 at 17:37:13 UTC, IGotD- wrote:
> You cannot use the most significant bit as it will not work 
> with some 32-bit systems. Linux with a 3G kernel position for 
> example. Better to use the least significant bit as all 
> allocated memory is guaranteed to be aligned. Regardless this 
> requires compiler support for masking off this bit.

Hm. Not sure if I follow, I think we are talking about stuffing 
bits into the counter and not the address?

> Now where going into halfway fat pointer support. Then we can 
> just use fat pointers instead and have full freedom.

But fat pointers are 16 bytes, so quite expensive.



More information about the Digitalmars-d-learn mailing list