Viewing Code - fdmap
fdmap, mmap complement system call
This patch provides a new system call 'fdmap' which implements the complement of 'mmap'. This means that while mmap allows for associating a memory region with a file descriptor, fdmap allows for associating a file descriptor with a memory region. The fdmap function in user-mode takes as an argument a memory region, a size, a mode and returns a file descriptor that can be used by read, write, and lseek. This is useful for scenarios where you want to access a region of memory as if it were a file on disk without actually writing it to disk. It also allows for making use of legacy interfaces that expect a file descriptor.