Modules | |
| Toy Command Interpreter | |
Data Structures | |
| struct | InvPageTable |
| Info about each page #. More... | |
| struct | ToyMM |
| Structure that defines a Toy Memory Manager. More... | |
Defines | |
| #define | MAX_PROCESSES 10 |
| Maximum number of processes. | |
| #define | MIN_MEMSIZE 1000 |
| Minimum allowable number of memory elements. | |
| #define | TMM_CONSOLE_PROMPT "[%03d]$ " |
Typedefs | |
| typedef InvPageTable | InvPageTable |
| Info about each page #. | |
| typedef ToyMM | ToyMM |
| Structure that defines a Toy Memory Manager. | |
| typedef enum ErrMessage_t | ErrMessage_t |
| Enumerated type listing valid error return values. | |
Functions | |
| ToyMM * | TMM_Create (int memSize) |
| Creates a new Toy Memory Manager. | |
| ErrMessage_t | TMM_Free (ToyMM *tmm) |
| Frees a Toy Memory Manager. | |
| int | TMM_ParseFile (const char *fname, ToyMM *tm) |
| Function to parse a commandfile. | |
| int | TMM_ParseFilePtr (FILE *fp, ToyMM *tm, int prompt) |
| Just like TMM_ParseFile, except Parses input from file pointer. | |
|
|
Maximum number of processes.
Definition at line 28 of file ToyMem.h. Referenced by TMM_AllocateHeap(), TMM_Create(), TMM_EnablePaging(), TMM_Free(), TMM_FreeHeap(), TMM_PagedAllocateProcess(), TMM_ParseLine(), TMM_PrintHeap(), TMM_PrintPages(), TMM_PrintPageTable(), TMM_PrintProcessMemory(), TMM_PrintProcessTable(), TMM_ReallocateHeap(), TMM_StoreHeapInteger(), TMM_StoreHeapString(), and TMM_SwapCreate(). |
|
|
Minimum allowable number of memory elements.
|
|
|
Enumerated type listing valid error return values. All values except ERR_UNKNOWN and ERR_NONE have accompanying values in the string table ErrMessages[], for example ErrMessages[ERR_INVALIDINPUT] Referenced by main(), TMM_AllocateHeap(), TMM_EnablePaging(), TMM_Free(), TMM_FreeHeap(), TMM_PagedAllocateProcess(), TMM_PagedTerminateProcess(), TMM_ParseFilePtr(), TMM_ParseLine(), TMM_PrintAllMemory(), TMM_PrintFrames(), TMM_PrintHeap(), TMM_PrintInvertedPageTable(), TMM_PrintPages(), TMM_PrintPageTable(), TMM_PrintProcessMemory(), TMM_PrintProcessTable(), TMM_ReallocateHeap(), TMM_StoreHeapInteger(), TMM_StoreHeapString(), TMM_StoreInteger(), TMM_StoreString(), TMM_TerminateProcess(), and TMM_WatchPaging(). |
|
|
Info about each page #.
|
|
|
Structure that defines a Toy Memory Manager. Contains an array of pointers to processes(NULL denotes no process), an array of memory elements, a linked list of free space, and a member describing the size of the memory array. |
|
|
Creates a new Toy Memory Manager.
Definition at line 466 of file ToyMem.c. References invPageTable, MAX_PROCESSES, mem, memFree, memSize, page, pageSize, processList, swap, TMM_CreateSegList(), ToyMem::type, and watchPaging. Referenced by main(). |
|
|
Frees a Toy Memory Manager.
Definition at line 511 of file ToyMem.c. References ErrMessage_t, invPageTable, MAX_PROCESSES, mem, memFree, processList, TMM_FreeSegList(), TMM_PagedTerminateProcess(), TMM_PagingEnabled(), TMM_SwapDestroy(), and TMM_TerminateProcess(). Referenced by main(). |
|
||||||||||||
|
Function to parse a commandfile.
Definition at line 779 of file ToyMem.c. References TMM_ParseFilePtr(). Referenced by main(). |
|
||||||||||||||||
|
Just like TMM_ParseFile, except Parses input from file pointer. if prompt is nonzero, a console prompt is printed to stdout before each line is read. Definition at line 712 of file ToyMem.c. References ErrMessage_t, PRINT_ERROR, and TMM_ParseLine(). Referenced by TMM_ParseFile(). |
1.3-rc3