diff --git a/Sim03/sim03 b/Sim03/sim03 index 5bbd904..fa0a6df 100755 Binary files a/Sim03/sim03 and b/Sim03/sim03 differ diff --git a/Sim03/simulator.c b/Sim03/simulator.c index 67e218a..e9d0fbe 100644 --- a/Sim03/simulator.c +++ b/Sim03/simulator.c @@ -780,6 +780,46 @@ bool memManager(ProcessControlBlockLL *pcbList, MEMORY_SIGNALS memCode, int offs return subFunctionSuccess; } +/* +Name: memManager +Process: checks to make sure an allocate will be successful, + makes sure that an access will not segfault (or return segfault if it does), + and initializes memory and deallocates memory +Function Input/Parameters: PCBList (ProcessControlBlockLL *), memory code (MEMORY_SIGNALS), + offset (int), size (int), configuration data (ConfigDataType *) +Function Output/Parameters: none +Function Output/Returned: none? +Device Input/Device: none +Device Output/Device: none +Dependencies: ??? +*/ +void memManager(ProcessControlBlockLL *pcbList, MEMORY_SIGNALS memCode, int offset, int size, ConfigDataType *configPtr) +{ + // switch case for each memory code + switch (memCode) + { + case MEMORY_INITIALIZE: + /* code */ + break; + + case MEMORY_ALLOCATE: + /* code */ + break; + + case MEMORY_ACCESS: + /* code */ + break; + + case MEMORY_DEALLOCATE: + /* code */ + break; + + default: + break; + } + // no return, void (temp) +} + /* Name: runCPU Process: runs the CPU operations for however long it takes