| 90 | } |
| 91 | |
| 92 | int MemoryManager::getTotalMemory() |
| 93 | { |
| 94 | |
| 95 | if (!this->totalMemory) |
| 96 | { |
| 97 | int memory = *((int *)MEMORY_SIZE_ADDRESS); |
| 98 | // ax寄存器保存的内容 |
| 99 | int low = memory & 0xffff; |
| 100 | // bx寄存器保存的内容 |
| 101 | int high = (memory >> 16) & 0xffff; |
| 102 | |
| 103 | this->totalMemory = low * 1024 + high * 64 * 1024; |
| 104 | } |
| 105 | |
| 106 | return this->totalMemory; |
| 107 | } |
| 108 | |
| 109 | void MemoryManager::openPageMechanism() |
| 110 | { |
nothing calls this directly
no outgoing calls
no test coverage detected