-
内存映射
内存映射:将内核空间的一段内存区域映射到用户空间。可以将内核空间的一段内存区域同时映射到多个进程,实现进程间的共享内存通信。
《理解内核空间、内存区域、用户空间》
《Memory-mapped I/O》
《理解Computer中slack space, page cache, thrash》
-
memory map in computer science
A memory map is a structure of data(which usually resides in memory itself) that indicates how memory is laid out.
-
Memory-mapped file
A memory-mapped file is a segment of virtual memory 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 momory object, or other resource that the OS can reference through a file descriptor.
Once present, this correlation between the file and the memory space permits applications to treat the mapped portion as if it were primary memory.
-
Benefits
The benefit of memory mapping a file is increasing I/O performance, especially when used on large files.
For small files, memory-mapped files can result in a waste result in a waste of slack space as memory maps are always aligned
理解Computer中memory-mapped file
最新推荐文章于 2024-08-22 14:11:17 发布