Dynamic C++ classes: a lightweight mechanism to update code in a running program

  • Authors:
  • Gísli Hjálmtýsson;Robert Gray

  • Affiliations:
  • AT&T Labs - Research, Florham Park, NJ;Thayer School of Engineering, Dartmouth College, Hanover, NH

  • Venue:
  • ATEC '98 Proceedings of the annual conference on USENIX Annual Technical Conference
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Techniques for dynamically adding new code to a running program already exist in various operating systems, programming languages and runtime environments. Most of these systems have not found their way into common use, however, since they require programmer retraining and invalidate previous software investments. In addition, many of the systems are too high-level for performance-critical applications. This paper presents an implementation of dynamic classes for the C++ language. Dynamic classes allow run-time updates of an executing C++ program at the class level. Our implementation is a lightweight proxy class that exploits only common C++ features and can be compiled with most modern compilers. The proxy supports version updates of existing classes as well as the introduction of new classes. Our language choice and proxy implementation is targeted towards performance-critical applications such as low-level networking in which the use of C++ is already widespread.