Пример #1
0
        public void Free()
        {
            var ram = new Ram(2, 1);

            var pcb = new ProcessContextBlock {
                Id = 1
            };
            var frame = ram.Allocate(pcb);

            Assert.That(frame, Is.Not.Null);

            frame = ram.Allocate(pcb);
            Assert.That(frame, Is.Not.Null);

            ram.Free(frame);

            frame = ram.Allocate(pcb);
            Assert.That(frame, Is.Not.Null);
        }