Escape Analysis

In programming language compiler optimization theory, escape analysis is a method for determining the dynamic scope of pointers. It is related to pointer analysis and shape analysis.

When a variable (or an object) is allocated in a subroutine, a pointer to the variable can escape to other threads of execution, or to calling subroutines. If an implementation uses tail call optimization (usually required for functional languages), objects may also be seen as escaping to called subroutines. If a language supports first-class continuations (as do Scheme and Standard ML of New Jersey), portions of the call stack may also escape.

If a subroutine allocates an object and returns a pointer to it, the object can be accessed from undetermined places in the program — the pointer has "escaped". Pointers can also escape if they are stored in global variables or other data structures that, in turn, escape the current procedure.

Escape analysis determines all the places where a pointer can be stored and whether the lifetime of the pointer can be proven to be restricted only to the current procedure and/or thread.

Read more about Escape Analysis:  Optimizations, Practical Considerations, Example (Java), Examples (Scheme)

Famous quotes containing the words escape and/or analysis:

    Narcotics have been systematically scapegoated and demonized. The idea that anyone can use drugs and escape a horrible fate is an anathema to these idiots. I predict that in the near future, right wingers will use drug hysteria as a pretext to set up an international police apparatus.
    Gus Van Sant, U.S. screenwriter and director, and Dan Yost. Father Tom Murphy (William S. Burroughs)

    Whatever else American thinkers do, they psychologize, often brilliantly. The trouble is that psychology only takes us so far. The new interest in families has its merits, but it will have done us all a disservice if it turns us away from public issues to private matters. A vision of things that has no room for the inner life is bankrupt, but a psychology without social analysis or politics is both powerless and very lonely.
    Joseph Featherstone (20th century)