|
|
|
|
|
by jcul
1958 days ago
|
|
Yes generally for userspace addresses they are 0. But more importantly they can be used for other stuff, commonly referred to as pointer tagging / smuggling etc. It's a useful optimisation technique where you can add some extra metadata without having to dereference a pointer. |
|
As for storing tags in pointers on 64b platforms it is probably better to use the 3 low order bits. Another useful trick is what was used in PDP-10 MacLisp and is used by BDW GC: encode the type information in virtual memory layout itself.