TD3:I5 Implement PageProvide, untested for now

This commit is contained in:
Yorick Barbanneau 2021-12-07 22:50:52 +01:00
parent f3fe45a1de
commit 469c62ee82
5 changed files with 65 additions and 2 deletions

View file

@ -61,6 +61,10 @@ Machine::Machine(bool debug)
mainMemory = new char[MemorySize];
for (i = 0; i < MemorySize; i++)
mainMemory[i] = 0;
#ifdef CHANGED
pageProvider = new PageProvider((int)(MemorySize/PageSize));
#endif
DEBUG ('a', "Allocated page: %i\n", page);
#ifdef USE_TLB
tlb = new TranslationEntry[TLBSize];
for (i = 0; i < TLBSize; i++)

View file

@ -26,6 +26,10 @@
#include "translate.h"
#include "disk.h"
#ifdef CHANGED
#include "pageprovider.h"
#endif
// Definitions related to the size, and format of user memory
#define PageSize SectorSize // set the page size equal to
@ -201,7 +205,9 @@ class Machine:public dontcopythis {
TranslationEntry *currentPageTable;
unsigned int currentPageTableSize;
#ifdef CHANGED
PageProvider * pageProvider;
#endif // CHANGED
private:
bool singleStep; // drop back into the debugger after each
// simulated instruction