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

Method allocateVirtualPages

lab8/src/2/src/kernel/memory.cpp:175–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175int MemoryManager::allocateVirtualPages(enum AddressPoolType type, const int count)
176{
177 int start = -1;
178
179 if (type == AddressPoolType::KERNEL)
180 {
181 start = kernelVirtual.allocate(count);
182 }
183
184 return (start == -1) ? 0 : start;
185}
186
187bool MemoryManager::connectPhysicalVirtualPage(const int virtualAddress, const int physicalPageAddress)
188{

Callers

nothing calls this directly

Calls 1

allocateMethod · 0.45

Tested by

no test coverage detected