knot126 / Melon

Foxy library that does everything* and tastes good
Other
1 stars 0 forks source link

Memory and file mapping functions #28

Open knot126 opened 1 week ago

knot126 commented 1 week ago

something like:

void *DgMemoryMap(size_t size, uint32_t protection, uint32_t flags); // Create anonymous memory map of the given size
void *DgMemoryMapFile(const char *path, size_t *size, uint32_t protection, uint32_t flags); // Create a memory map of the given file
void DgMemoryUnmap(void *map, size_t length); // Unmap a mapped section of memory

helpers:

size_t DgMemoryGetPageSize(void); // get page size in bytes