Page frame reuse(Windows 7)
There are cases of multiple writable virtual pages being aliased with totally
differently contexts to the same physical page. These are for "don't care"
pages. Specifically in the case where the virtual memory manager generates
sparse MDLs to optimize IO read sizes. In these cases the OS wants to read say
disk offset 0x1000 and 0x3000, so it might generate a single read that's 0x3000
long, mapping the 0x1000 data to the desired location, mapping the 0x2000 data
to a don't care page, and the 0x3000 data to the desired location. When the dma
transfer happens, the middle page is still read, but it's values are sent to a
don’t care page. The strategy is it's faster to do a single 0x3000 read than two
0x1000 reads. I've written code myself where I needed a big dummy receive
buffer, and built an MDL that mapped all the pages of a few megabytes virtual
space to a single page. This was used for some error recovery where I needed to
discard a bunch of data, but still needed a virtual address/MDL to pass to the
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of
Sent: Friday, January 12, 2018 12:04 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Page frame reuse(Windows 7)
On Jan 11, 2018, at 8:30 PM, firstname.lastname@example.org wrote:
> Some hypervisors will optimize physical memory use by detecting identical
pages, even across VMs, and map them all to the same physical page. If you have
a hundred VMs, all the identical read only pages, like code, can add up to a
significant amount of memory.
Yes, but you cannot have two virtual pages map to a single physical page with
two different contents.
Tim Roberts, email@example.com
Providenza & Boekelheide, Inc.
NTDEV is sponsored by OSR
Visit the list online at:
MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
To unsubscribe, visit the List Server section of OSR Online at