Obtaining Page-Aligned Memory; Note that memory regions returned by malloc are typically not page-aligned, even if the size of the memory is a multiple of the page size. If you want to protect memory obtained from malloc, you will
have to allocate a larger memory region and find a page-aligned region within it.
int fd = open ("/dev/zero",O_RDONLY);
char* memory = mmap (NULL, page_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE, fd, 0);
close (fd);
mprotect (memory, page_size, PROT_READ);