VMemory subclass: #Clock instanceVariableNames: 'hand' classVariableNames: '' poolDictionaries: '' category: nil ! Clock comment: 'I am a Clock memory manager' ! !Clock methodsFor: 'instance initialization'! init hand := 1. ^super init. ! ! !Clock methodsFor: 'memory access'! removePid: aPid super removePid: aPid. (hand > pages size) ifTrue: [ hand := 1 ]. ! insert: page pages add: page. ! replace: page [ dirty includes: (pages at: hand)] whileTrue: [ dirty remove: (pages at: hand). hand := hand + 1. (hand > pages size) ifTrue: [ hand := 1 ] ]. pages removeAtIndex: hand. self insert: page ! !