The reverse operation, replacing memory pointers with position-independent symbols or positions, is sometimes referred to as unswizzling, and is performed during serialization (saving).
There are a potentially unlimited number of forms into which a pointer can be unswizzled, but some of the most popular include: Swizzling in the general case can be complicated.
The reference graph of pointers might contain an arbitrary number of cycles; this complicates maintaining a mapping from the old unswizzled values to the new addresses.
Associative arrays are useful for maintaining the mapping, while algorithms such as breadth-first search help to traverse the graph, although both of these require extra storage.
In systems with weak memory protection this can lead to exposure of confidential data or modification of code likely to be executed.