A process begins life with a certain amount of memory mapped to the text (the code) and data segments of the program file, together with the shared libraries that it is linked with. It can allocate memory on its heap at runtime using mmap(2):
void *mmap(void *addr, size_t length, int prot, int flags,
int fd, off_t offset);
This function maps length bytes of memory from the file with the descriptor fd, starting at offset in the file, and returns a pointer to the mapping, assuming it is successful. Since the underlying hardware works in pages, length...