| 82 | } |
| 83 | |
| 84 | int MemoryManager::allocatePhysicalPages(enum AddressPoolType type, const int count) |
| 85 | { |
| 86 | int start = -1; |
| 87 | |
| 88 | if (type == AddressPoolType::KERNEL) |
| 89 | { |
| 90 | start = kernelPhysical.allocate(count); |
| 91 | } |
| 92 | else if (type == AddressPoolType::USER) |
| 93 | { |
| 94 | start = userPhysical.allocate(count); |
| 95 | } |
| 96 | |
| 97 | return (start == -1) ? 0 : start; |
| 98 | } |
| 99 | |
| 100 | void MemoryManager::releasePhysicalPages(enum AddressPoolType type, const int paddr, const int count) |
| 101 | { |