Slide 51
Slide 51 text
Memory management interfaces in userspace
System calls
void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset);
int msync(void *addr, size_t len, int flags);
int munmap(void *addr, size_t len);
int mprotect(void *addr, size_t len, int prot);
int madvise(void *addr, size_t len, int behav);
int mlock(void *addr, size_t len); /* mlockall(int flags) */
int munlock(void *addr, size_t len);/* munlockall(void) */
int minherit(void *addr, size_t len, int inherit);
int mincore(void *addr, size_t len, char *vec);
void *mquery(void *addr, size_t len, int prot, int flags, int fd, off_t offset);
libc malloc(3) is implemented via mmap(2)
Vladimir Kirillov OpenBSD Kernel Internals