Marks a region in physical memory as being used
| 53 | |
| 54 | // Marks a region in physical memory as being used |
| 55 | void MarkMemoryRegionUsed(uint64_t base, size_t size) { |
| 56 | for (uint32_t blocks = (size + (PHYSALLOC_BLOCK_SIZE - 1)) / PHYSALLOC_BLOCK_SIZE, align = base / PHYSALLOC_BLOCK_SIZE; blocks > 0; blocks--, usedPhysicalBlocks++) |
| 57 | SetBit(align++); |
| 58 | } |
| 59 | |
| 60 | // Marks a region in physical memory as being free |
| 61 | void MarkMemoryRegionFree(uint64_t base, size_t size) { |