How to limit the old space size in the VM

We can limit the size of the old space size using VirtualMachine>>#maxOldSpaceSize: maxOldSpaceSize: aValue "the max allowed size of old space (Spur only; nil otherwise; 0 implies no limit except that of the underlying platform)" ^ self parameterAt: 67 put: aValue by passing it a value in bytes.

 Smalltalk vm maxOldSpaceSize: 6 * (1024 * 1024 * 1024)
  

To reset the old space size we can set a value of zero.

 Smalltalk vm maxOldSpaceSize: 0