Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Read only literals
Last updated at 6:25 pm UTC on 26 March 2018
https://hal.archives-ouvertes.fr/hal-01356338/document

A low Overhead Per Object Write Barrier for the Cog VM

Clément Béra, RMOD - INRIA Lille Nord Europe, clement.bera@inria.fr

Abstract

In several Smalltalk implementations, a program can mark any object as read-only (unfortunately incorrectly sometimes miscalled immutable). Such read-only objects cannot be mutated unless the program explicitly revert them to a writable state.

This feature, called write barrier, may induce noticeable overhead if not implemented carefully, both in memory footprint and execution time. In this paper I discuss the recent addition of the write barrier in the Cog virtual machine and the support introduced in the Pharo 6 image.

I detail specific aspects of the implementation that allows, according to multiple evaluations presented in the paper, to have such a feature with little to no overhead.

See also

How to make an object read-only