Font Size: a A A

Research Of Memory Management Mechanism Based On Dynamic Allocation Algorithm

Posted on:2018-12-06Degree:MasterType:Thesis
Country:ChinaCandidate:R G YuFull Text:PDF
GTID:2348330542990796Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Mobile devices has become increasingly important in the mobile Internet,in addition to meeting the user's most basic functional requirements,but also needs to have higher performance and lower power consumption.Google Android has become the most popular operating system on mobile devices because of its open source code,support for a variety of hardware architecture.As the core component of the Android,ART uses automatic memory management technology just like Dalvik.This thesis mainly completes the analysis of the ART memory management mechanism and achieves the optimization of the original garbage collection algorithm.This thesis first studies the memory management mechanism of the ART,including the data structure in the memory management,the creating process of the memory space,the principle of the Semi-Space algorithm and Mark-Compact algorithm.Then it analysis the performance bottleneck in the Semi-Space algorithm,this algorithm uses two memory space that has equal proportion,which severely limits the memory space utilization rate and affects the efficiency of garbage collection.So this thesis combines the dynamic allocation strategy with Mark-Compact algorithm to design Dynamic-Allocation algorithm that dynamically adjusts two memory space to improve garbage collection efficiency and solve the occurrence of memory overflow.The Dynamic-Allocation algorithm is divided into four phases: Initialization phase,Marking phase,Sweep phase and Finish phase.In the Sweep phase,the garbage objects in the From Space are cleared and the surviving objects are moved to the To Space.If the To Space is not able to fully accommodate all the surviving objects in the From Space,then Mark-Compact algorithm is used to move the object to the boundary of the two heap space.And in addition to clearing the relevant member variables and resetting the data structure used in the garbage collection,the Finish phase also needs re-define the size of the two heap space by using the dynamic partition strategy.Finally,in this thesis,the optimization effect of the garbage collection algorithm has been tested and evaluated on the Nexus5 Smartphone through the benchmark.In the performance evaluation,the overall performance of the Dynamic-Allocation algorithm increases by 21.48% and 23.02% in the CaffeineMark and 0xBenchmark;and according to the different objects(mainly for young objects),garbage collection performance increases by 27.19% in the 0xBenchmark.It can be seen that the optimization effect is obvious and the expected benefits is achieved.
Keywords/Search Tags:Android, Android Runtime, Auto memory management, Garbage Collection algorithm, Nexus5
PDF Full Text Request
Related items