[Updated on Apr. 18] Integration of CiNii Articles into CiNii Research


Bibliographic Information

Other Title
  • Optimizing Memory Allocation of Ruby Implementation by Dynamic Region Analysis

Search this article



Region-based memory management divides the memory space by the unit called the region and allocates and releases the memory by the region in LIFO order. Objects requiring memory in the program are allocated to regions corresponding to their lifetimes. The lifetime of an object is determined before execution, so it is expected that the runtime overhead by garbage collection is reduced. Dynamic languages such as Ruby, Python, and JavaScript contain dynamic information that cannot be obtained until runtime. Therefore it is difficult to determine the highly accurate object and region mappings which can quickly release allocated region of objects that are no longer needed by static analysis. In this paper, we propose dynamic region analysis as a method to apply region-based memory management to dynamic languages. By analyzing at runtime, regions can be analyzed using information which is not determined until runtime, so that accurate region mapping can be determined higher than the static analysis. In order to measure the performance of our method, the dynamic region analysis mechanism was introduced into the Ruby programming language, and the evaluation was carried out. In some evaluations, the frequency and pause times of garbage collection itself are reduced and have seen a reduction in execution time.



Report a problem

Back to top