*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 05 Mar 1999 14:57:47 +0100
changeset 322 48f27b856cb9
parent 321 116cc0d63619
child 323 42233c66f9a0
*** empty log message ***
smalltalk.rc
--- a/smalltalk.rc	Fri Mar 05 14:56:49 1999 +0100
+++ b/smalltalk.rc	Fri Mar 05 14:57:47 1999 +0100
@@ -210,6 +210,73 @@
 "/
 "/ ObjectMemory freeSpaceGCLimit:300000. 
 
+"/ experimental: try to always keep some bytes in the pocket
+"/ this changes the memory policy, to start the background collector whenever
+"/ freespace drops below 250k or 500k have been allocated since the last GC. 
+"/ AND to allocate more memory, if (after the collect) less than 1Mb is free.
+"/ Doing so makes the system behave better if lots of memory is required
+"/ for short periods of time, since it prepares itself for that situation
+"/ during idle time. (I often walk around in the fileBrowser, loading big
+"/ files like XWorkstation.st or SystemBrowser.st ....)
+
+ObjectMemory freeSpaceGCAmount:1000000. 
+ObjectMemory freeSpaceGCLimit:250000. 
+ObjectMemory incrementalGCLimit:500000. 
+ObjectMemory oldSpaceIncrement:500000.
+ObjectMemory startBackgroundCollectorAt:5. 
+ObjectMemory startBackgroundFinalizationAt:5. 
+
+"/ experimental:
+"/ run the background collector at a dynamic priority - it will
+"/ now always get a chance to make some progress ...
+
+Smalltalk addStartBlock:[
+    'private.rc [info]: start timeSlicing...' infoPrintCR.
+    Processor startTimeSlicing.
+    Processor supportDynamicPriorities:true.
+    ObjectMemory backgroundCollectProcess priorityRange:(4 to:9).
+    ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9).
+].
+
+"/ experimental: configure the memory manager to quickly increase
+"/ its oldSpace, as long as it stays below 8Mb (i.e. do not enter
+"/ a blocking mark&sweep or compress, but go straight ahead increasing
+"/ the oldSpace). Above that, behave as usual, i.e. try a GC first,
+"/ then increase the oldSpace size if that did not help.
+"/ If you have a machine with lots of (real) memory, you may want to
+"/ increase the number. The value below should be ok for 16-32Mb machines.
+"/
+ObjectMemory fastMoreOldSpaceLimit:8*1024*1024.
+ObjectMemory fastMoreOldSpaceAllocation:true.
+!
+
+"/ another experimental (and a secret for now, since I dont want
+"/ you to play with those ;-)
+"/ For now, this is experimental. Once the best numbers
+"/ have been found, I'll hardwire them and document it ...
+
+|a|
+ObjectMemory newSpaceSize > (500*1024) ifTrue:[
+    a := #(nil nil nil nil -16 -4 -2 -2 0 0 16 nil) copy.
+] ifFalse:[
+"/         min max cpy /32 /16 /8 /4 /2 /4 /8 /16 /32 "
+    "/
+    "/ slow tenure - keeps objects longer in newSpace,
+    "/  producing more scavenge overhead, but releasing IGC somewhat
+    "/
+"/  a := #(nil nil nil -100 -8 -4 -1  1 2  4  8   16 nil) copy.
+"/  a := #(nil nil nil nil -16 -4  0  0  0 4 16 nil) copy.
+
+    "fast tenure"
+    "/
+    "/ fast tenure - moves objects earlier into oldSpace,
+    "/ releasing newSpace collector; however, the oldSpace IGC
+    "/ may have more work to do.
+    "/
+    a := #(nil nil nil nil -20 -8 -3 -1 -1 1 16 nil) copy.
+].
+ObjectMemory tenureParameters:a.
+
 "/
 "/ lazy loading
 "/ (faster fileIn) - this is EXPERIMENTAL.