One embodiment of the present invention provides a system that supports
read-only objects within an object-addressed memory hierarchy. During
operation, the system receives a request to access an object, wherein the
request includes an object identifier for the object that is used to
reference the object within the object-addressed memory hierarchy. In
response to this request, the system uses the object identifier to
retrieve an object table entry associated with the object. If the request
is a write request, the system examines a read-only indicator within the
object table entry. If this read-only indicator specifies that the object
is a read-only object, the system performs a corrective action to deal
with the fact that the write request is directed to a read-only object.