Patent attributes
Techniques for efficiently swizzling pointers in persistent objects are provided. In one embodiment, a computer system can allocate slabs in a persistent heap, where the persistent heap resides on a byte-addressable persistent memory of the system, and where each slab is a continuous memory segment of the persistent heap that is configured to store instances of an object type used by an application. The system can further store associations between the slabs and their respective object types, and information indicating the locations of pointers in each object type. At the time of a system restart or crash recovery, the system can iterate through each slab and determine, based on the stored associations, the slab's object type. The system can then scan though the allocated objects in the slab and, if the system determines that the object includes any pointers based on the stored pointer location information, can swizzle each pointer.