Search results
Results from the WOW.Com Content Network
A memory-mapped file is a segment of virtual memory [1] that has been assigned a direct byte-for-byte correlation with some portion of a file or file-like resource. This resource is typically a file that is physically present on disk, but can also be a device, shared memory object, or other resource that an operating system can reference through a file descriptor.
File-backed mapping maps an area of the process's virtual memory to files; that is, reading those areas of memory causes the file to be read. It is the default mapping type. Anonymous mapping maps an area of the process's virtual memory not backed by any file, made available via the MAP_ANONYMOUS/MAP_ANON flags.
Memory-mapped I/O is preferred in IA-32 and x86-64 based architectures because the instructions that perform port-based I/O are limited to one register: EAX, AX, and AL are the only registers that data can be moved into or out of, and either a byte-sized immediate value in the instruction or a value in register DX determines which port is the source or destination port of the transfer.
A process can store data in memory-mapped files on memory-backed file systems, such as the tmpfs file system or file systems on a RAM drive, and map files into and out of the address space as needed. A set of processes may still depend upon the enhanced security features page-based isolation may bring to a multitasking environment.
In computing, memory mapping may refer to: Memory-mapped file , also known as mmap() Memory-mapped I/O , an alternative to port I/O; a communication between CPU and peripheral device using the same instructions, and same bus, as between CPU and memory
POSIX also provides the mmap API for mapping files into memory; a mapping can be shared, allowing the file's contents to be used as shared memory. Linux distributions based on the 2.6 kernel and later offer /dev/shm as shared memory in the form of a RAM disk, more specifically as a world-writable directory (a directory in which every user of ...
In computer science, a memory map is a structure of data (which usually resides in memory itself) that indicates how memory is laid out. The term "memory map" has different meanings in different contexts. It is the fastest and most flexible cache organization that uses an associative memory. The associative memory stores both the address and ...
When the operating system requested memory to load a program, or a program requested more memory to hold data from a file for instance, it would call the memory handling library. This examined the mappings to look for an area in main memory large enough to hold the request. If such a block was found, a new entry was entered into the table.