標題: | 在爪哇虛擬機器中於方法回傳時釋放堆積中區域性物件 Freeing Local Objects in Heap upon Method Returning in JVM |
作者: | 劉彥志 鍾崇斌 資訊科學與工程研究所 |
關鍵字: | 垃圾收集;堆積管理;區域物件;爪哇虛擬機器;記憶體受限;Garbage Collection;Heap Management;Local Object;Java Virtual Machine;Memory Constrained |
公開日期: | 2005 |
摘要: | 爪哇虛擬機器(Java Virtual Machine)近來被利用在記憶體受限的嵌入式系統中。然而,在記憶體受限的環境下執行爪哇程式會導致呼叫垃圾收集的次數變多。在最糟的情況下,總執行時間的一半都是在做垃圾收集的動作。而有一些生命週期不會超出配置他之方法的物件,我們稱之為區域物件。所以,如何在方法回傳後掃除該方法之區域物件來減少垃圾收集的頻率就變成記憶體受限系統下的重要課題。然而現存掃除區域的方案是將區域物件放入方法框(Method Frame)中,這會帶來先天上的限制使我們沒辦法掃除所有的區域物件。所以我們將提出一種在堆積(Heap)而非方法框中管理區域物件的機制。他可以讓我們在記憶體極受限的情形下得到比原始爪哇機器好11%的速度效能。 Java Virtual Machine is adopted in embedded memory constrained system recently. However, executing a Java program in memory constrained system will result in more frequent invocation of garbage collection. In worst case, the ratio of garbage collection time to total execution time is about 50%. There are objects whose lifetime will not escape scope of method which allocates it, which is called a local object. So, freeing local objects upon method return to reduce frequency of garbage collection is important in memory constrained system. However, current approach to allocate local objects in stack brings some constraints that we can not free all local objects. So, we propose a mechanism to manage local objects in heap but not stack to free more local objects. Comparing to original Java Virtual Machine, it leads to about 11% speedup to total execution time in extremely memory constrained environment. |
URI: | http://140.113.39.130/cdrfb3/record/nctu/#GT009217608 http://hdl.handle.net/11536/74135 |
顯示於類別: | 畢業論文 |