uClinux 365
}
if ((prot & PROT_WRITE) && (flags & MAP_PRIVATE)) {
printk("Private writable mappings not supported\n");
return -EINVAL;
}
…
2. If a file pointer is provided and if the file operations of the file support
the mmap function, then the file specific mmap is called.
…
if (file && file->f_ops->mmap)
file->f_ops->mmap(file, &vma)
return vma.vm_start;
…
3. If no file pointer is provided then it allocates the requested memory from
the kernel memory allocator using kmalloc.
…
…
result = kmalloc(len, GFP_KERNEL);
…
…
10.5 Process Creation
Process creation in Linux is done using the fork() system call. fork()
creates a new child process for the caller. Once fork returns, the parent and
child are two independent entities having individual PIDs. Theoretically what ...