Pointer Swizzling - Methods of Swizzling

Methods of Swizzling

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. Various serialization libraries provide general swizzling systems. In many cases, however, swizzling can be performed with simplifying assumptions, such as a tree or list structure of references.

The different types of swizzling are:

  • Automatic swizzling
  • On-demand swizzling

Read more about this topic:  Pointer Swizzling

Famous quotes containing the words methods of and/or methods:

    Methods of thought which claim to give the lead to our world in the name of revolution have become, in reality, ideologies of consent and not of rebellion.
    Albert Camus (1913–1960)

    Generalization, especially risky generalization, is one of the chief methods by which knowledge proceeds... Safe generalizations are usually rather boring. Delete that “usually rather.” Safe generalizations are quite boring.
    Joseph Epstein (b. 1937)