RC is a dialect of C that adds safe, region-based memory management to C:
 
  • Region-based memory management allocates objects in a program-specified region. Objects cannot be freed individually; instead regions are deleted with all their contained objects. Region-based memory management is a fairly common programming style, for instance it is used in the Apache web server (where the regions are called pools and also used to manage other resources).
  • RC is safe: RC maintains for each region r a reference count of the number of external pointers to objects in r, i.e., of pointers not stored within r. Deleting a region with a non-zero reference count causes a runtime error (abort). Thus RC programs cannot access freed memory. The overhead for safety in RC is low (less than 11% on a group of realistic benchmarks).
  • RC's compiler, rcc, is based on gcc and distributed under the GNU General Public License, in source
    code form. The distribution is available in two tar files:

      rc.tar.gz: the rcc compiler and region library.
      rctests.tar.gz: a set of 6 RC programs.

    RC has been tested on sparc/solaris machines (Solaris 2.6 and Solaris 7) and on x86/Linux machines (Redhat 6.2 and Redhat 7), but should not be hard to port to other platforms.

    More information can be found in the RC User's Manual (also included in the distribution).

    Please send all bug reports to David Gay, dgay@acm.org.