Implementation and Performance Analysis of the EVM's Java Dynamic Memory Manager and Garbage Collector

EVM에서의 자바 동적 메모리 관리기 및 쓰레기 수집기의 구현 및 성능 분석

  • 이상윤 (한국전자통신연구원 임베디드S/W연구단) ;
  • 원희선 (한국전자통신연구원 임베디드S/W연구단) ;
  • 최병욱 (한양대학교 정보통신대학 정보통신학부)
  • Published : 2006.08.01


Java has been established as one of the most widely-used languages owing to its support of object-oriented concepts, safety, and flexibility. Garbage collection in the Java virtual machine is a core component that relieves application programmers of difficulties related to memory management. In this paper, we propose a memory manager and a garbage collector that is implemented on a embedded java virtual machine. The memory manager divide a heap into various-sized cells and manages it as blocks of same-sized cells. So it is possible to allocate and free memory fast. We adopted the 3-color based Mark & Sweep garbage collector as our base algorithm and we propose 4-color based Mark & Sweep garbage collector for supporting multi-threaded program. The proposed garbage collector occurs memory fragmentation but we show through a experiment that the fragmentation ratio is almost fixed according as we create objects continuously.


  1. Sun Microsystems, 'Java2 Platform, Micro Edition, Connected Device Configuration (CDC)',, 2005
  2. T. Lindholm, F. Yellin, 'The JavaTM Virtual Machine Specification', 2nd Ed., Addison-Wesley, 1999
  3. D. A. Barrett and B. G. Zorn, 'Using lifetime predictors to improve memory allocation performance,' In Proceedings of SIGPLAN Conference on Programming Languages Design and Implementation(PLDI), Vol.24, No.7, pp.187-196, June, 1993
  4. S. M. Blackburn, P. Cheng, and K. S. McKinley, 'Myths and reality: The performance impact of garbage collection,' In Proceedings of International Conference on Measurement and Modeling of Computer Systems, pp.25-36, June, 2004
  5. H. Lieberman and C. E. Hewitt, 'A real-time garbage collector based on the lifetimes of objects,' Communications of the ACM, Vol.26, No.6, pp.419-429, 1983
  6. W. Liu, Z. Chen, and S. Tu, 'Research and analysis of garbage collection mechanism for real-time embedded java,' In Proceedings of International Conference on Computer Supported Cooperative Work in Design, pp.462-468, May, 2004
  8. Chia-Tien Dan Lo, Witawas Srisa-an and J. Morris Chang, 'Who is collecting your java garbage?,' IT Pro. IEEE Computer Society, pp.44-50, March April, 2003
  9. D. Doligez, and X. Leroy, 'A Concurrent, Generational Garbage Collector for a Multithreaded Implementation of ML,' In Proc. 20th ACM Symp. Principles of Programming Languages, ACM Press, pp.113-123, 1993
  11. George E. Collins, 'A method for overlapping and erasure of lists,' Communications of the ACM, Vol.3, No.12, pp.655-657, December, 1960
  12. John McCarthy, 'Recursive functions of symbolic expressions and their computations by machine,' Communications of the ACM, pp.184-195, 1960
  13. Marvin L. Minsky, 'A Lisp garbage collector algorithm using serial secondary storage,' Technical Report Memo 58, Project MAC. MIT, Cambridge, December, 1963
  14. ?Andrew W. Appel, 'Simple generational garbage collection and fast allocation,' Software Practice and Experience, Vol.19, No.2, pp.171-183, 1989
  15. E. W. Dijkstra, L. Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens, ' On-the-fly garbage collection: An exercise in cooperation,' Communication of the ACM, Vol.21, No.11, pp.965-975, November, 1978