I feel I'm getting perplexed during learning to use the DDK function
ZwMapViewOfSection.
What the DDK documentation says about parameter CommitSize:
"CommitSize: Specifies the size, in bytes, of the initially committed
region of the view. CommitSize is only meaningful for page-file backed
sections. For mapped sections, both data and image are always
committed at section creation time. This parameter is ignored for
mapped files. This value is rounded up to the next host-page-size
boundary. "
To my understanding, The term "committed" is pertinent to the virtual
address space of a process. For example, a page in virtual address
space is called "committed" when and only when it has a corresponding
physical memory page. If without the context of a process virtual
address space, "committed" has no meaning.
As mentioned above, DDK documentation says: "For mapped sections, both
data and image are always committed at section creation time. "
However, I can't understand this word. Indeed, when one call
ZwCreateSection successfully, a section object is created. But at this
point, there is yet no virtual address page bound to the section, in
other word, the section object cannot be called "committed" when it is
just created.
That is what makes me perplexed. I've thought it over for serveral
hours but still felt clueless. I eagerly await someone's help. Any
reply will be highly appreciated. Thanks in advance.
Your understanding is wrong. If a page is committed, then it has
backing storage of some sort from which it can be paged in upon demand.