public void LessSwap() { if (SwapAreas.Count == 0) { return; } int index = SwapAreas.Count - 1; // last one Swapfile swapfile = SwapAreas[index]; swapfile.Disable(); SwapAreas.RemoveAt(index); }
public void MoreSwap() { if (SwapAreas.Count >= MaxAreas) { return; } int id = SwapAreas.Count; int priority = (MaxAreas - id) * PriorityMult + PriorityBase; Swapfile swapfile = new Swapfile(id, FileSizeMiB, priority); SwapAreas.Add(swapfile); swapfile.Enable(); }