| 61 | } |
| 62 | |
| 63 | int MemoryManager::allocatePhysicalPages(enum AddressPoolType type, const int count) |
| 64 | { |
| 65 | int start = -1; |
| 66 | |
| 67 | if (type == AddressPoolType::KERNEL) |
| 68 | { |
| 69 | start = kernelPhysical.allocate(count); |
| 70 | } |
| 71 | else if (type == AddressPoolType::USER) |
| 72 | { |
| 73 | start = userPhysical.allocate(count); |
| 74 | } |
| 75 | |
| 76 | return (start == -1) ? 0 : start; |
| 77 | } |
| 78 | |
| 79 | void MemoryManager::releasePhysicalPages(enum AddressPoolType type, const int paddr, const int count) |
| 80 | { |