Escape analysis

Hi

Just a simple question, because I am hearing about it alot, but don’t seem to see it in any books… what is escape analysis?

http://www.ssw.uni-linz.ac.at/Teaching/Ph.D.Theses/Kotzmann/

Very simply, escape analysis is an attempt to idenfiy ways that data might “escape” a given system. Such analyses are useful for optimizing code by checking if objects or pointers stay in a given method or function. If they do stay within the context of the method or function, then it is feasible to throw the object or pointer on the local stack instead of on the (slower) heap.

Does that make sense? I tried to keep it simple, so I may have left out certain intricacies. Anyone else want to add something?