Using virtual addresses as object references
An alternative to surrogates is to use ordinary virtual addresses for inter-object referencing. Usually (but not always) this involves mapping distributed or persistent data into specified parts of the application's address space relying on page faults to trap and resolve references to nonresident data. The choice between these two referencing schemes involves tradeoffs. Virtual addresses promise easier integration with programming languages and faster local pointer dereferences, whereas surrogates can simplify object-based aspects of storage management, such as garbage collection and heap compaction. The key justifications for surrogate pointers are eliminated by 64-bit address spaces and proper operating system virtual memory support. When these facilities are available, the flexibility of surrogate pointers may not be worth their cost.