Luna/libc/include/sys/mman.h
apio 08c888eaae
All checks were successful
continuous-integration/drone/push Build is passing
kernel+libc: Remove (de)allocate_memory and replace it with POSIX mmap
2023-03-14 20:43:15 +01:00

29 lines
475 B
C

/* sys/mman.h: Memory allocation and deallocation. */
#ifndef _SYS_MMAN_H
#define _SYS_MMAN_H
#include <bits/mmap-flags.h>
#include <sys/types.h>
#define PAGE_SIZE 4096UL
#define MAP_FAILED (void*)-1
#ifdef __cplusplus
extern "C"
{
#endif
/* Map a file into memory. */
void* mmap(void* addr, size_t len, int prot, int flags, int fd, off_t offset);
/* Remove a memory mapping. */
int munmap(void* addr, size_t len);
#ifdef __cplusplus
}
#endif
#endif