Beispiel #1
0
        public void LessSwap()
        {
            if (SwapAreas.Count == 0)
            {
                return;
            }

            int      index    = SwapAreas.Count - 1; // last one
            Swapfile swapfile = SwapAreas[index];

            swapfile.Disable();
            SwapAreas.RemoveAt(index);
        }
Beispiel #2
0
        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();
        }