The Study of Stack Allocation in Loop Based on Escape Analysis
Xu Xing · Chinese Journal of Computers · 2008
The technique of stack allocation improves the efficiency of Java program,but the trade-off between the ratio of allocated objects and the size of stack is difficult.In this paper,a flow-insensitive,inter-procedural,and context-sensitive escape analysis is implemented.The allocation policy based on loop as a basic unit is presented,and the concepts of object stack and stack region are proposed.The authors implement the stack allocation based on escape analysis through the loop analysis.The result of SPECjvm98 shows that 8.3% to 25%(with an average of 15.18%)of all objects could be stack allocated in the new algorithm with the controlled size of stack.