MCPcopy Create free account
hub / github.com/YatSenOS/YatSenOS-Tutorial-Volume-1 / allocateVirtualPages

Method allocateVirtualPages

lab7/src/5/src/kernel/memory.cpp:211–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211int MemoryManager::allocateVirtualPages(enum AddressPoolType type, const int count)
212{
213 int start = -1;
214
215 if (type == AddressPoolType::KERNEL)
216 {
217 start = kernelVirtual.allocate(count);
218 }
219
220 return (start == -1) ? 0 : start;
221}
222
223bool MemoryManager::connectPhysicalVirtualPage(const int virtualAddress, const int physicalPageAddress)
224{

Callers

nothing calls this directly

Calls 1

allocateMethod · 0.45

Tested by

no test coverage detected