ACM Home Page
Please provide us with feedback. Feedback
Space and time-efficient memory layout for multiple inheritance
Full text PdfPdf (2.30 MB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications table of contents
Denver, Colorado, United States
Pages: 256 - 275  
Year of Publication: 1999
ISBN:1-58113-238-7
Also published in ...
Authors
Peter F. Sweeney  IBM T. J. Watson Research Center, P.O. Box 704, Yorktown Heights, NY
Joseph (Yossi) Gil  Department of Computer Science, Technion-IIT, Haifa 32000, Israel
Sponsor
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 1,   Downloads (12 Months): 41,   Citation Count: 11
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/320384.320408
What is a DOI?

ABSTRACT

Traditional implementations of multiple inheritance bring about not only an overhead in terms of run-time but also a significant increase in object space. For example, the number of compiler-generated fields in a certain object can be as large as quadratic in the number of its subobjects. The problem of efficient object layout is compounded by the need to support two different semantics of multiple inheritance: shared, in which a base class inherited along distinct paths occurs only once in the derived class, and repeated, in which this base has multiple distinct occurrences in the derived. In this theoretical and foundational paper, we introduce two new techniques to optimize memory layout for multiple inheritance. The main ideas behind these techniques are the inlining of virtual bases and bidirectional memory layout. Our techniques never increase time overhead, and usually even decrease it. We show that in some example hierarchies, more than ten-fold reduction in the space overhead can be achieved. We analyze the complexity of the algorithms to apply these techniques, and give theorems to estimate the efficacy of this application. For concreteness, techniques and examples are discussed in the context of C++.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
M. Burke, H. Srinivasan, and P. E Sweeney. A framework for evaluating space and time overhead for c++ object models. Research Report RC 20421, IBM, T2 Watson Research Center, March 1996. Declassified .tan. 1998.
3
 
4
L. Carter and M. Wegman. Universal classes of hash functions. d. Comput. Syst. Sci., 18:143-154,1979.
 
5
C. Chambers, J. Dean, and D. Grove. Whole-program optimization of object-oriented languages. Technical Report UW-CSE-96-06-02, University of Washington, Department of Computer Science and Engineering, June 1996.
 
6
 
7
E. Ernst. Propogating mixins. In R. Guerraoui, editor, To appear in theProceedings of the 13th European Conference on Object-Oriented Programming, Lecture Notes in Computer Science, Lisbon, Portugal, June 1999. ECOOP'99, Springer Verlag.
 
8
S. Even. personal communication, March 1999.
9
 
10
 
11
 
12
D.T. Jones, M. 1. O'R.iordan, and M. J. Zbikowski. Method and system for implementing virtual functoins and virtual base classes and setting a this pointer for an object-odentedprogramming language. US Patent 5,297,284, Mar. 1994. Assignee: Microsoft Corporation, Redmond Wash.
13
 
14
A.K.rall, J. Vitek, and R. N. Horspool. Near optimal hierarchical encoding of types. In M. Ak~it and S. Matsuoka, editors, Proceedings of the 11th European Conference on Object-Oriented Programming, number 1241 in Lecture Notes in Computer Science, pages 128-145, Jyvaskyla, Finland, June 9-13 1997. ECOOP'97, Springer Vedag.
 
15
 
16
D. Lea, editor, the 6th C++ Conference, Cambridge, MA, Apr. 1994. USEN1X.
 
17
M.A. Linton and D. Z. Pan. Interface translation and implementation filtering. In Lea { 16}, pages 227-236.
 
18
 
19
B. Martin. The separation of interface and implementation in C++. In the 3rd C++ Conference, pages 51--62, Washington, DC, Apr. 1991. USENIX.
 
20
21
 
22
L. Nackman and J. Barton. Base-class composition with multiple derivation and virtual bases. In Lea {16}, pages 57-72.
 
23
L. R. Nackman and J. J. Barton. Base-class composition with multiple derivation and virtual bases. In Lea {16}, pages 57-71.
 
24
OOPSLA'95. Proceedings of the 10~h Annum Conference on Object-Oriented Programming Systems, Languages, and Applications, Austin, Texas, USA, Oct. 15-19 I995. Acre SIGPLAN Notices 30(10) Oct. 1995.
25
26
 
27
A. L. M. Shalit. Dylan Reference Manual Addison-Wesley, Reading, MA, 1996.
 
28
R.M. Stallman. Using andPorting GNU CC. the Free Software Foundation, Feb. 1998. for version 2.8.1.
 
29
B. Stroustrup. Multiple inheritance for C++. In Proceedings of the European Unix System User's Group Conference, pages 189--207, May 1987.
 
30
 
31
 
32
P. E Sweeney and M. Burke. A methodology for quantifying and evaluating the space overheadin C++ object models. IBM Research Report RC 21370, IBM, T..t. Watson Research Center, P.O. Box 704, Yorktown Heights, NY 10598, USA, Dec. 1998.
33

CITED BY  11

Collaborative Colleagues:
Peter F. Sweeney: colleagues
Joseph (Yossi) Gil: colleagues