A method of operating a computer involving data structures in a set of data structures.
As unloaded data structures are needed during runtime, a data structure is received
from a first memory. The data structure includes one or more sets of instructions
and one or more constants. Instructions from the data structure are stored in a
first portion of a second memory, which comprises RAM. Constants from the data
structure are stored in a second portion of the second memory if only if the respective
constant has not been stored in the second portion of the second memory. Indexes
in instructions that reference the constants are modified to correspond to the
respective locations of the constants in the second portion of the second memory,
and at least some instructions from the data structure are read and executed from
the RAM. Also described is a computer system including a memory and logic that,
for classes in a set of classes, receives a class from a class file and stores
constants from the class in a second portion of the memory if only if the respective
constant has not been stored in the second portion of the memory.