incrementalmemorymanager.rb

Path: lib/mues/os-extensions/incrementalmemorymanager.rb  (CVS)
Last Update: Sat Aug 18 22:54:10 -0700 2007

This file contains the IncrementalMemoryManager class: the is a MemoryManager that came as a spin off to the TrainMemoryManager. This does not, however, fully implement the train algorithm - rather, only those parts of the algorithm that apply within the context are used.

Here‘s how things work. There are two worker threads. One continuously goes through the active objects and checks to see if any are mature, at which point the object is moved into mature object space. The other thread continuously loops over the mature objects and deletes them. Finally, there is a controller thread. This thread starts the other two threads, waits a designated cycle length, then stops the threads, waits a designated interval length, and starts again. This allows for a granularity in both the deletion of objects and the detection of their maturity.

Also kept track of is the ratio between mature objects and all monitored objects. When this ratio falls too far out of line of a supplied ratio, the intervals are adjusted to (hopefully) compensate.

Synopsis

  (see MemoryManager.rb)

Subversion ID

$Id: incrementalmemorymanager.rb 1206 2004-05-09 21:25:11Z deveiant $

Authors

  • Martin Chase <stillflame@FaerieMUD.org>

Copyright

Copyright (c) 2000-2003 The FaerieMUD Consortium. All rights reserved.

This module is free software. You may use, modify, and/or redistribute this software under the terms of the Perl Artistic License. (See language.perl.com/misc/Artistic.html)

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Required files

mues/object  

[Validate]