[DGD] rlimits

Steve Wooster swooster at xprt.net
Mon Mar 29 22:33:26 CEST 2004


At 01:12 PM 3/29/2004 +0200, you wrote:
>The inner ticks don't count for the outer rlimits.  However, the mudlib
>has some say in this, since each use of rlimits() is checked at compile
>time and possibly also at runtime.  The kernel library doesn't allow
>increasing the resource limits beyond what they currently are, <unless>
>the current object is a System object.

Could that allow code to do something like this without running out of 
ticks? (assume depth comes first, ticks comes second in the argument list)

void func()
{
     // Assume I have 100 ticks remaining.
     // Assume rlimits uses 5 ticks.
     rlimits (0,95)
     {
         Code that takes up 90 ticks;
     }
     rlimits (0,90)
     {
         Code that takes up 85 ticks;
     }
     // Are there still about 90 ticks left despite having
     // executed 175 ticks worth of code?
}

Since the code in rlimits doesn't decrease the ticks outside the rlimits, 
and the rlimits at each step is within the remaining ticks would this work? 
Or am I misunderstanding something? Thanks.

-Steve Wooster

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list