Dynamic memory allocation/deallocation behavior in Java programs
Anthony S. Fong, R.C.L. Li
Abstract
Anthony S. Fong, R.C.L. Li
Abstract
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.
OpenAlex reports 3 citations for this work. Citation counts describe recorded attention and do not establish research quality.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
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.
Key concepts: Computer science, Java, Garbage collection, Memory management, Java applet, Operating system, Real time Java, C dynamic memory allocation