ObjectMemory.st
changeset 17532 f71ff4160e94
parent 17525 6d632c4b12d0
child 18120 e3a375d5f6a8
child 18400 68951cdfb08b
--- a/ObjectMemory.st	Fri Feb 20 23:41:07 2015 +0100
+++ b/ObjectMemory.st	Fri Feb 20 23:45:22 2015 +0100
@@ -671,33 +671,35 @@
 initialize
     "initialize the class"
 
+    "/ protect against double initialization
     AllocationFailureSignal isNil ifTrue:[
-	AllocationFailureSignal := AllocationFailure.
-	AllocationFailureSignal notifierString:'allocation failure'.
-
-	MallocFailureSignal := MallocFailure.
-	MallocFailureSignal notifierString:'(malloc) allocation failure'.
-
-	LowSpaceSemaphore := Semaphore new name:'LowSpaceSemaphore'
-    ].
-    DisposeInterruptHandler := self.
-
-    "/ BackgroundCollectMaximumInterval := 3600.     "/ run it at least once an hour
-    BackgroundCollectMaximumInterval := nil.      "/ only run when space situation makes it feasable
-    IncrementalGCLimit := 500000.                 "/ run it whenever 500k have been allocated
-    FreeSpaceGCLimit := FreeSpaceGCAmount := nil. "/ no minumum-freeSpace trigger.
-    MemoryInterruptHandler := self.
-    ExceptionInterruptHandler := self.
-
-    VMSelectors := #( #noByteCode #invalidCodeObject #invalidByteCode #invalidInstruction
-		      #tooManyArguments #badLiteralTable #receiverNotBoolean: #typeCheckError
-		      #integerCheckError #wrongNumberOfArguments: #privateMethodCalled
-		      #doesNotUnderstand: #invalidReturn: #invalidReturnOrRestart:
-		      #userInterrupt #internalError: #spyInterrupt #timerInterrupt #stepInterrupt
-		      #errorInterrupt:with: #disposeInterrupt #recursionInterrupt
-		      #memoryInterrupt #fpExceptionInterrupt #signalInterrupt: #childSignalInterrupt
-		      #ioInterrupt #customInterrupt #schedulerInterrupt #contextInterrupt
-		      #interruptLatency:receiver:class:selector:vmActivity:id:).
+        AllocationFailureSignal := AllocationFailure.
+        AllocationFailureSignal notifierString:'allocation failure'.
+
+        MallocFailureSignal := MallocFailure.
+        MallocFailureSignal notifierString:'(malloc) allocation failure'.
+
+        LowSpaceSemaphore := Semaphore new name:'LowSpaceSemaphore'.
+
+        DisposeInterruptHandler := self.
+
+        "/ BackgroundCollectMaximumInterval := 3600.     "/ run it at least once an hour
+        BackgroundCollectMaximumInterval := nil.      "/ only run when space situation makes it feasable
+        IncrementalGCLimit := 500000.                 "/ run it whenever 500k have been allocated
+        FreeSpaceGCLimit := FreeSpaceGCAmount := nil. "/ no minumum-freeSpace trigger.
+        MemoryInterruptHandler := self.
+        ExceptionInterruptHandler := self.
+
+        VMSelectors := #( #noByteCode #invalidCodeObject #invalidByteCode #invalidInstruction
+                          #tooManyArguments #badLiteralTable #receiverNotBoolean: #typeCheckError
+                          #integerCheckError #wrongNumberOfArguments: #privateMethodCalled
+                          #doesNotUnderstand: #invalidReturn: #invalidReturnOrRestart:
+                          #userInterrupt #internalError: #spyInterrupt #timerInterrupt #stepInterrupt
+                          #errorInterrupt:with: #disposeInterrupt #recursionInterrupt
+                          #memoryInterrupt #fpExceptionInterrupt #signalInterrupt: #childSignalInterrupt
+                          #ioInterrupt #customInterrupt #schedulerInterrupt #contextInterrupt
+                          #interruptLatency:receiver:class:selector:vmActivity:id:).
+    ]
 
     "Modified: / 5.8.1998 / 15:30:12 / cg"
 ! !
@@ -5615,11 +5617,11 @@
 !ObjectMemory class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.285 2015-02-20 21:39:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.286 2015-02-20 22:45:22 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.285 2015-02-20 21:39:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.286 2015-02-20 22:45:22 cg Exp $'
 !
 
 version_SVN