FACTOID # 62: The four largest nations are Russia, China, USA, and Canada.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > 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. Compiler optimization is the process of tuning the output of a compiler to minimise some attribute (or maximise the efficiency) of an executable program. ... It has been suggested that Software pointer be merged into this article or section. ... Pointer analysis, or points-to analysis, is a static code analysis technique that establishes which pointers, or heap references, can point to which locations. ... Shape analysis is a static code analysis technique that discovers and verifies properties of linked, dynamically allocated data structures in (usually imperative) computer programs. ...


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 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. In computer science, a subroutine (function, method, procedure, or subprogram) is a portion of code within a larger program, which performs a specific task and is relatively independent of the remaining code. ... It has been suggested that Software pointer be merged into this article or section. ... A thread in computer science is short for a thread of execution. ...


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.


Optimizations

A compiler can use the results of escape analysis as basis for optimizations:

  • Converting heap allocations to stack allocations. If an object is allocated in a subroutine, and a pointer to the object never escapes, the object may be a candidate for stack allocation instead of heap allocation.
  • Synchronization elision. If an object is found to be accessible from one thread only, operations on the object can be performed without synchronization.
  • Breaking up objects or scalar replacement. An object may be found to be accessed in ways that do not require the object to exist as a sequential memory structure. This may allow parts (or all) of the object to be stored in CPU registers instead of in memory.

In computer science, dynamic memory allocation is the allocation of memory storage for use in a computer program during the runtime of that program. ... To meet Wikipedias quality standards, this article or section may require cleanup. ...

Practical considerations

In object-oriented programming languages Dynamic compilers are particularly good candidates for performing escape analysis. In traditional static compilation method overriding can make escape analysis impossible, as any called method might be overridden by a version that allows a pointer to escape. Dynamic compilers can perform escape analysis using the available information on overloading, and re-do the analysis when relevant methods are overridden by dynamic code loading. An object-oriented programming language (also called an OO language) is one that allows or encourages, to some degree, object-oriented programming techniques such as encapsulation, inheritance, interfaces, and polymorphism. ... Dynamic compilation is a process used by some programming language implementations to gain performance during program execution. ...


Escape analysis has been a target of interest in particular due to the Java programming language. Java's combination of heap-only object allocation, built-in threading, and the Sun HotSpot dynamic compiler creates a candidate platform for escape analysis related optimizations (see Escape analysis in Java). Notably Java Standard Edition 7 ("Dolphin") is expected to implement escape analysis and related optimizations. Java is an object-oriented applications programming language developed by Sun Microsystems in the early 1990s. ... HotSpot is the primary Java Virtual Machine for desktops and servers produced by Sun Microsystems. ... Java is often perceived as significantly slower and more memory-consuming than natively compiled languages such as C or C++. However, Java programs execution speed have improved a lot, due to introduction of Just-In Time compilation[1] and mainly optimizations in the Java Virtual Machine itself introduced overtime. ...


See also



 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m