[opensource-dev] Script Memory Management Algorithm

Michael Schlenker schlenk at uni-oldenburg.de
Mon Mar 8 11:03:40 PST 2010


Am 08.03.2010 um 18:46 schrieb Kelly Linden:

> We are not out to write a new malloc for mono.  What we have is a system that throws an exception when the memory used by the script hits a certain threshold (64k currently).  This exception is caught so we can "crash" the script.  The future small scripts and big scripts projects will add new functions to set and get this threshold value, allowing scripters to effectively control how much memory is reserved for their script.  We will continue to use mono's default memory management within the reserved memory thresholds.  It is a much simpler problem to solve.
> 
While your at it, how about a static analyzer for mono/LSL that determines guaranteed lowest memory consumption for a script and sets the threshold there. 

That would have the benefit of easing scripters work by providing useful defaults for all the easy cases without them having to do anything at all. 

The scheme should only break down if the mono GC behaves weird. In that case scripters have a huge problem anyway as they cannot set any threshold without being crashed at random by a lazy GC.

Michael


More information about the opensource-dev mailing list