| @@ -109,7 +109,7 @@ class MMC extends IMem{ | |||
| for (let i=0; i < this.__switches.length; i++){ | |||
| let pgs = this.__switches[i].mem.pages; | |||
| if (paddr < pgs){ | |||
| this.__switches[i].mem.clearPage(addr); | |||
| this.__switches[i].mem.clearPage(paddr); | |||
| break; | |||
| } | |||
| paddr -= pgs; | |||
| @@ -119,7 +119,7 @@ class MMC extends IMem{ | |||
| clear(){ | |||
| this.__switches.forEach((s)=>{ | |||
| s.clear(); | |||
| s.mem.clear(); | |||
| }); | |||
| return this; | |||
| } | |||