Skip to Main Content
As the object-oriented paradigm becomes the mainstream paradigm on software development, due to its attractive features that can effectively divide a complex software problem into several independent modules, one of the object-oriented languages - Java, has become popular in recent years because it is widely used in the rapidly growing Internet computing. However, as with other object-oriented languages, Java has the big drawback of poor performance. One of the main causes of the performance deficiency is the extensive use of dynamic memory allocations and deallocations during object or array creations and destructions. Even a simple Othello applet game easily requires half a million of memory allocations for only one game play. After analysis of the memory allocation behavior of Java programs, it is concluded that about 99% of the allocations are of sizes less than 1024 bytes. The analysis also shows that most of the allocated chunks in small size will survive only a very short period of time and after they are garbage collected, they can be reused in the very near future. This implies the memory allocation/deallocation pattern in Java is bounded to a certain kind of locality. The information presented in this paper is a reference for designing an efficient hardware memory allocation/deallocation unit.