4 ms·
> mmap will go and create the page table mappings (entries) for that address space (~262144 of them with 4k pages) I haven't looked at the mmap implementation
by cesarb 7y ago
> mmap will go and create the page table mappings (entries) for that address space (~262144 of them with 4k pages)
I haven't looked at the mmap implementation in detail, but I believe it doesn't even do that: it just creates a new VMA (struct vm_area_struct in the kernel) for that address space range, and the page table is updated lazily.