sysconf(3C) returns the system dependent size of a memory page. For portability, applications should not embed any constants specifying the size of a page. Note that it is not unusual for page sizes to vary even among implementations of the same instruction set.
mprotect(2) assigns the specified protection to all pages in the specified address range. The protection cannot exceed the permissions allowed on the underlying object.
caddr_t brk(caddr_t addr); caddr_t sbrk(intptr_t incr);
brk(2) identifies the lowest data segment location not used by the caller as addr (rounded up to the next multiple of the system page size).
sbrk(2), the alternate function, adds incr bytes to the caller data space and returns a pointer to the start of the new data area.