Safe and Flexible Memory Management in Cyclone

نویسندگان

  • Michael Hicks
  • Greg Morrisett
  • Dan Grossman
  • Trevor Jim
چکیده

Cyclone is a type-safe programming language intended for applications requiring control over memory management. Our previous work on Cyclone included support for stack allocation, lexical region allocation, and a garbage-collected heap. We achieved safety (i.e., prevented dangling pointers) through a region-based type-and-effects system. This paper describes some new memory-management mechanisms that we have integrated into Cyclone: dynamic regions, unique pointers, and reference-counted objects. Our experience shows that these new mechanisms are well suited for the timely recovery of objects in situations where it is awkward to use lexical regions. Crucially, programmers can write reusable functions without unnecessarily restricting callers’ choices among the plethora of memory-management options. To achieve this goal, Cyclone employs a combination of polymorphism and scoped constructs that temporarily let us treat objects as if they were allocated in a lexical region.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Safe manual memory management in Cyclone

The goal of the Cyclone project is to investigate how to make a low-level C-like language safe. Our most difficult challenge has been providing programmers control over memory management while retaining safety. This paper 1 describes our experience trying to integrate and use effectively two previously-proposed, safe memory-management mechanisms: statically-scoped regions and tracked pointers. ...

متن کامل

Short Presentation: Combining Garbage Collection and Safe Manual Memory Management

Garbage collection (GC) provides an elegant, convenient, and safe approach to managing memory. For many applications, it is an appropriate technique for all data. For other applications, it works well only for most data. For example, it may complicate data-level interoperability with legacy code or exhibit poor performance with respect to a few critical data types. In other systems, such as emb...

متن کامل

Cyclone: A Safe Dialect of C

Cyclone is a safe dialect of C. It has been designed from the ground up to prevent the buffer overflows, format string attacks, and memory management errors that are common in C programs, while retaining C’s syntax and semantics. This paper examines safety violations enabled by C’s design, and shows how Cyclone avoids them, without giving up C’s hallmark control over low-level details such as d...

متن کامل

Unique Pointers: Performance, Burden, and Inference

Cyclone is an actively developed, type-safe, C-like programming language. Historically, language designers have either leaned toward safety or toward explicit memory management. Cyclone aims to provide the safety of a language like Java, while providing the control over data representation and memory management of low-level languages like C. Cyclone features a garbage-collected heap. However, g...

متن کامل

USENIX Association Proceedings of the 2002 USENIX Annual Technical Conference

Cyclone is a safe dialect of C. It has been designed from the ground up to prevent the buffer overflows, format string attacks, and memory management errors that are common in C programs, while retaining C’s syntax and semantics. This paper examines safety violations enabled by C’s design, and shows how Cyclone avoids them, without giving up C’s hallmark control over low-level details such as d...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003