Table of Contents

Class MemoryBudget

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

The memory ceilings of the servers running right now, so the next one to start knows what is left.

public static class MemoryBudget
Inheritance
MemoryBudget
Inherited Members

Remarks

It adds up ceilings, not memory in use: a ceiling is what a server is allowed to grow to, and the budget is about not letting every server grow to the whole machine at once. A server in Manual mode reserves its own MaxRamGb and is never lowered; only Automatic ones adapt to what is left.

App-wide state, like Global: one machine, one budget.

Methods

Release(string)

Gives a stopped server's ceiling back. Harmless if it had none.

public static void Release(string serverId)

Parameters

serverId string

Reserve(string, long)

Records the ceiling a server has just started with. Replaces an earlier one.

public static void Reserve(string serverId, long ceilingMb)

Parameters

serverId string
ceilingMb long

ReservedByOthersMb(string)

What the other running servers have reserved, in MB.

public static long ReservedByOthersMb(string serverId)

Parameters

serverId string

Returns

long