Luna/kernel/include/memory/MemoryManager.h
apio 3891d0c52e Rename KernelMemoryManager to MemoryManager
Kind of a more catchy name, isn't it?
2022-09-24 21:45:13 +02:00

23 lines
763 B
C++

#pragma once
#include <stdint.h>
#define MAP_READ_WRITE 1 << 0
#define MAP_USER 1 << 1
#define MAP_EXEC 1 << 2
namespace MemoryManager
{
void* get_mapping(void* physicalAddress, int flags = MAP_READ_WRITE);
void release_mapping(void* mapping);
void* get_unaligned_mapping(void* physicalAddress, int flags = MAP_READ_WRITE);
void* get_unaligned_mappings(void* physicalAddress, uint64_t count, int flags = MAP_READ_WRITE);
void release_unaligned_mapping(void* mapping);
void release_unaligned_mappings(void* mapping, uint64_t count);
void* get_page(int flags = MAP_READ_WRITE);
void* get_pages(uint64_t count, int flags = MAP_READ_WRITE);
void release_page(void* page);
void release_pages(void* pages, uint64_t count);
}