Browse Prior Art Database

An Object Layout for Architectures with Strict Alignment Requirements Disclosure Number: IPCOM000015296D
Original Publication Date: 2001-Oct-13
Included in the Prior Art Database: 2003-Jun-20

Publishing Venue



A class declaration includes zero or more member declarations and optionally but typically specifies its direct superclass. Given a class declaration, the object layout determines how its zero or more instance fields are placed in memory. The object layout must satisfy two constraints, inheritance constraint and alignment constraint. The former requires the layout of a class to be completely based on the layout of its superclass, while the latter requires each instance field to be put in memory according to the architectural alignment constraint defined by its data type. The conventional layout of a class allocates a memory region for its own instance members next to the memory region for its superclass, thereby satisfying the inheritance constraint. Within the memory region, it places its own instance members in the declaration order, with pads where necessary, thereby meeting the alignment constraint. We propose a new method which allows a highly space-efficient layout. Given the declaration of a class, it performs the following steps;