Garbage collection safety for region-based memory management

被引:4
|
作者
Elsman, M [1 ]
机构
[1] IT Univ Copenhaven, DK-2400 Copenhagen NV, Denmark
关键词
performance; languages; theory; garbage collection; region inference; standard ML;
D O I
10.1145/640136.604190
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In this paper, we prove the safety of integrating region-based memory management and Cheney-style copying garbage collection. The safety property relies on a refinement of the region typing rules that forbids dangling pointers during evaluation. To accommodate the triggering of garbage collection at any step in the evaluation process, we base our type-safety result for the region-based system on a small-step contextual semantics and show that whenever a well-typed expression reduces to another expression, possibly by deallocating a region, then no dangling pointer is introduced. Because there are no dangling pointers in the initial heap, no dangling pointers appear during evaluation. Although in principle, the refinement of the region typing rules leads to less flexibility and can cause worse memory behavior than when dangling pointers are permitted, experiments show that, for a range of benchmark programs, the refinement has little effect on overall memory behavior.
引用
收藏
页码:123 / 134
页数:12
相关论文
共 50 条
  • [1] On the Effects of Integrating Region-Based Memory Management and Generational Garbage Collection in ML
    Elsman, Martin
    Hallenberg, Niels
    [J]. PRACTICAL ASPECTS OF DECLARATIVE LANGUAGES (PADL 2020), 2020, 12007 : 95 - 112
  • [2] Garbage-Collection Safety for Region-Based Type-Polymorphic Programs
    Elsman, Martin
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (PLDI):
  • [3] Region-based memory management
    Tofte, M
    Talpin, JP
    [J]. INFORMATION AND COMPUTATION, 1997, 132 (02) : 109 - 176
  • [4] Region-based memory management in cyclone
    Grossman, D
    Morrisett, G
    Jim, T
    Hicks, M
    Wang, YL
    Cheney, J
    [J]. ACM SIGPLAN NOTICES, 2002, 37 (05) : 282 - 293
  • [5] Region-based memory management for Mercury programs
    Phan, Quan
    Janssens, Gerda
    Somogyi, Zoltan
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2013, 13 : 959 - 1024
  • [6] Integrating region memory management and tag-free generational garbage collection
    Elsman, Martin
    Hallenberg, Niels
    [J]. JOURNAL OF FUNCTIONAL PROGRAMMING, 2021, 31
  • [7] Region-Based RTSJ Memory Management: State of the art
    Hamza, H.
    Counsell, S.
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2012, 77 (05) : 644 - 659
  • [8] Runtime Support for Region-Based Memory Management in Mercury
    Phan, Quan
    Somogyi, Zoltan
    Janssens, Gerda
    [J]. ISMM'08: PROCEEDINGS OF THE 2008 INTERNATIONAL SYMPOSIUM ON MEMORY MANAGEMENT, 2008, : 61 - +
  • [9] Fast Escape Analysis for Region-based Memory Management
    Salagnac, G.
    Yovine, S.
    Garbervetsky, D.
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 131 : 99 - 110
  • [10] Memory safety without runtime checks or garbage collection
    Dhurjati, D
    Kowshik, S
    Adve, V
    Lattner, C
    [J]. ACM SIGPLAN NOTICES, 2003, 38 (07) : 69 - 80