Compare commits
2 commits
722df73955
...
37aa8c3b81
| Author | SHA1 | Date | |
|---|---|---|---|
| 37aa8c3b81 | |||
| d5705e42a4 |
2 changed files with 40 additions and 0 deletions
BIN
Sim03/sim03
BIN
Sim03/sim03
Binary file not shown.
|
|
@ -780,6 +780,46 @@ bool memManager(ProcessControlBlockLL *pcbList, MEMORY_SIGNALS memCode, int offs
|
||||||
return subFunctionSuccess;
|
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
|
Name: runCPU
|
||||||
Process: runs the CPU operations for however long it takes
|
Process: runs the CPU operations for however long it takes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue