Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Escape analysis

Domain-Specific Algorithm

Escape analysis is a compiler optimization method for determining the dynamic scope of pointers, meaning the places in a program where a pointer can be accessed. It is related to pointer analysis and shape analysis. A pointer escapes when an object allocated in a subroutine can be reached from other threads or from calling subroutines, for example because the pointer is returned or stored in a global variable. The analysis finds every place a pointer can be stored and whether its lifetime can be proven to stay within the current procedure or thread. When it can, a compiler may turn heap allocations into stack allocations, remove unneeded synchronization for objects used by only one thread, or break an object apart so its fields live in registers. Dynamic compilers are especially well placed to use it in object-oriented languages, and it became a target of interest through Java.

Connections

In Field

Source Escape analysis (Wikipedia)
Sources
Escape analysis (Wikipedia)
  • In Group: Compiler and Language Implementation Techniques, Lead
    escape analysis is a method for determining the dynamic scope of pointers
  • In Field: Programming Language Theory, Lead [in-field]
    In compiler optimization, escape analysis is a method
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.