diff options
author | pacien | 2018-05-01 15:55:45 +0200 |
---|---|---|
committer | pacien | 2018-05-01 15:55:45 +0200 |
commit | 05216a4ad06e4617838afcd4dc7317a203a3887b (patch) | |
tree | 0c0ff8367b61989eb96b29071f13ece2bae8c760 /randomp.py | |
parent | d2fec4901d6520e866481d4696d8347aab3eb171 (diff) | |
download | mempager-simulator-05216a4ad06e4617838afcd4dc7317a203a3887b.tar.gz |
Reformat code
Diffstat (limited to 'randomp.py')
-rw-r--r-- | randomp.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,12 +1,13 @@ | |||
1 | #!/usr/bin/env python3 | 1 | #!/usr/bin/env python3 |
2 | 2 | ||
3 | # UPEM / Programmation système / Projet : Simulation de gestion de mémoire virtuelle | ||
4 | # Pacien TRAN-GIRARD et Adam NAILI | ||
5 | 3 | ||
6 | from random import randint | 4 | from random import randint |
7 | from mem import Memory | 5 | from mem import Memory |
8 | from pageexception import PageException | 6 | from pageexception import PageException |
9 | 7 | ||
8 | # UPEM / System programming / Project: Memory paging simulator | ||
9 | # Pacien TRAN-GIRARD, Adam NAILI | ||
10 | |||
10 | 11 | ||
11 | class RandomPaginator: | 12 | class RandomPaginator: |
12 | def __init__(self, mem): | 13 | def __init__(self, mem): |
@@ -32,4 +33,3 @@ class RandomPaginator: | |||
32 | if page in self.mem.virt: self.mem.remove_virt(page) | 33 | if page in self.mem.virt: self.mem.remove_virt(page) |
33 | overwritten = self._put_main(page) | 34 | overwritten = self._put_main(page) |
34 | if overwritten is not None: self.mem.put_virt(overwritten) | 35 | if overwritten is not None: self.mem.put_virt(overwritten) |
35 | |||