Local Object Management
- An object is represented by a contiguous zone of memory.
- The first word points to the class of the object.
- The following words are the instance variables.
- The class keeps a method table for efficient lookup of methods
and also keeps the class variables (static variables).

Implementation of references
- A reference is represented by the (virtual) address of the
first word reserved for the object.
- Copying a reference is implemented by copying the address (just
one word).
- Testing if two objects are the same (identity test) is implemented
by comparing theirs addresses.
- References are only valid inside the process owning the object.
How should a reference be represented in a distributed language?
Accessing instance variables and invoking methods
- An instance variable is placed always at the same offset.
- The address of a method is placed always at the same offset
in the method table.
- The offsets are determined by the compiler (to machine language).
- The compiler can produce very efficient code to access an instance:
one machine instruction.
- The compiler can produce efficient code to invoke a method: a constant
number of machine instructions (plus parameter passing).
Inheritance of instance variables and methods

- The inherited instance variables preserve their offsets.
- The new instance variables are placed at the end of the inherited
variables.
- The inherited methods preserve their offset, even when they are
redefined.
- The new methods are placed at the end of the method table.
- Even though the compiler does not know the exact type of a referenced
object, it will look for an instance variable or a method at
a fixed offset.
Garbage Collection
- The garbage collector implements unlimited object lifetime by recycling
the space occupied by objects which are no more reachable.
- Typically Mark and Sweep, but also:
- Stop and Copy.
- Generational garbage collectors.
- Non stop garbage collectors.
- Compaction of the memory heap.
- Finalization: alarms the application that an object is no more reachable.
Conclusions
In a non distributed object oriented language:
- Accessing instance variables is as efficient as in non object
oriented languages.
- Dynamic binding is just a little bit less efficient than the static
binding of not object oriented languages.
- The efficient implementation of an object oriented language is in
general complex.
- A distributed object oriented implementation should be ideally as
efficient as a non distributed implementation when running on a single
address space.
- A distributed object system will be less expensive if it is based
on an existing programming language and an existing implementation of
that language.