Is the memory mapped file loaded into the user-mode address space or the process core address space?

I read about memory mapped files that allow a file to be shared between several processes.

Each process (a specific 32 bit) has 4 GB of private address space, which is divided into 2 GB of user-mode address space and 2 GB is reserved for the kernel, as described here by Eric Lippert . The user mode address space is private for each process and cannot be changed by another process.

So, does this mean that MMFs are mapped to the kernel mode address space, since it is divided into all processes?

I searched a lot about MMF, where it was mapped, but could not find any resource specifying this. So post a question here if my assumption is correct or am I missing something? Any resource for MSDN would be good too.

+4
source share
2 answers

Files with memory mapping are mapped to the user mode address space.

Think of it this way. Suppose you have a 4K file that is converted to memory in two processes. It simply means that one page of storage on disk is associated with a specific page of the virtual address space in each of the two processes.

Chart 3 on this page may help:

http://msdn.microsoft.com/en-us/library/ms810613.aspx

+3

. 2 .

.

.

, . . . - , . . , , , .

+3

Source: https://habr.com/ru/post/1540104/


All Articles