School of Computing

Aug 6
15:00 - 16:00
PLAS: Elisa Gonzales Boix & Clement Bera (Vrije Universiteit Brussel)
PLAS Group Seminar
Lazy Pointer Updates in GC Compaction

The compaction pause in moving GCs can be significant and is difficult to minimize. One solution is concurrent compaction, but it usually relies either on hardware support non present in x86/ARM or on a read barrier with significant overhead. Limiting the compaction pause by compacting part of the heap only in each pause is a difficult problem to tackle: any pointer in any object in the any part of the heap needs to be updated if it referenced a moved object. 

In our ISMM'15 paper, Eliot Miranda and I explained how we implemented a forwarding object design with a partial read barrier to execute efficiently the Smalltalk become operation. By maintaining a small set of invariants, most memory reads can be performed without paying the read barrier cost while the references are forwarded when needed. Our forwarding objects are created quickly but non atomically since their creation requires to maintain a small set of invariants. 

In this talk, we propose a compaction design where a small part of the heap is compacted at each GC compaction pause. To decrease the pause time, references to moved objects are not updated during the pause, instead, moved objects are replaced by forwarding objects, the small set of invariants is maintained and the references are lazily updated during program execution and the following GC marking phase. Since the marking phase of the GC guarantees that it removes all references to forwarding objects by updating the objects fields, it also frees the compacted memory regions where only forwarding objects remain.

The design is backed with a concrete implementation in open-smalltalk-vm. The implementation was evaluated on an industrial application performing software analysis, deployed on top of open-smalltalk-vm. Results show that updating lazily the pointers can reduce the compaction pause without noticeable overhead in the program's execution nor in the marking time.


Cornwallis South West,
University of Kent,
United Kingdom


Contact: O.Chitil
School of Computing

School of Computing, University of Kent, Canterbury, Kent, CT2 7NF

Enquiries: +44 (0)1227 824180 or contact us.

Last Updated: 14/08/2015