[ENH] Flexible LowSpaceWatcher

Georg Gollmann georg.gollmann at tuwien.ac.at
Thu Mar 30 10:45:12 UTC 2000


The current LowSpaceWatcher just alerts the user. This is not useful 
for servers or for situations when objects are cached and should be 
discarded when space becomes tight. I have now generalized the 
mechanism used in my MailArchiver 
(http://macos.tuwien.ac.at/Squeak/mailArchiver.html).

As an example setup is now:

   Smalltalk memoryHogs add: ArchivedMail

When space is low #freeSomeSpace gets sent:

   ArchivedMail>freeSomeSpace
    "Remove all cached text from my instances."
    self allInstancesDo: [ :m | m purgeText ]


If freeSomeSpace fails to free enough memory - maybe because no 
memoryHogs have been registered - the old behavior (alert the user) 
is invoked.

Georg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LowSpace.st
Type: application/mac-binhex40
Size: 4846 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000330/9d89f63b/LowSpace.hqx
-------------- next part --------------
----
Dipl.Ing. Georg Gollmann                TU-Wien, Zentraler Informatikdienst
                                         Wiedner Hauptstr. 8-10
phon:(+43-1) 58801 - 42022              A-1040 Wien
fax: (+43-1) 58801 - 42099
mail:gollmann at zid.tuwien.ac.at
http://macos.tuwien.ac.at/Gollmann.html


More information about the Squeak-dev mailing list