tac0S
Template Affectional Command Operating System
addrspace.h
Go to the documentation of this file.
1 
16 #ifndef ADDRSPACE_H
17 #define ADDRSPACE_H
18 
19 #include "copyright.h"
20 #include "filesys.h"
21 
22 #define UserStackSize 1024 // increase this as necessary!
23 
24 class AddrSpace
25 {
26  public:
28  AddrSpace (OpenFile * executable);
29  // initializing it with the program
30  // stored in the file "executable"
31 
33  ~AddrSpace ();
34 
36  void InitRegisters ();
37  // before jumping to user code
38 
40  void SaveState ();
41 
43  void RestoreState ();
44 
45  private:
47  TranslationEntry * pageTable;
48  // for now!
50  unsigned int numPages;
51  // address space
52 };
53 
54 #endif // ADDRSPACE_H
void RestoreState()
info on a context switch
Definition: addrspace.cc:192
~AddrSpace()
De-allocate an address space.
Definition: addrspace.cc:129
Definition: addrspace.h:24
The following class defines an entry in a translation table – either in a page table or a TLB...
Definition: translate.h:33
AddrSpace(OpenFile *executable)
Create an address space,.
Definition: addrspace.cc:63
Definition: openfile.h:77
void InitRegisters()
Initialize user-level CPU registers,.
Definition: addrspace.cc:148
void SaveState()
Save/restore address space-specific.
Definition: addrspace.cc:179
Data structures to represent the Nachos file system.