SectionAttributes Enumeration
Specifies the attributes for a section object.
A section object represents a section of memory that can be shared.
A process can use a section object to share parts of its memory address space (memory sections) with other processes.
Section objects also provide the mechanism by which a process can map a file into its memory address space.
Each memory section has one or more corresponding views.
A view of a section is a part of the section that is actually visible to a process.
The act of creating a view for a section is known as mapping a view of the section.
Each process that is manipulating the contents of a section has its own view;
a process can also have multiple views (to the same or different sections).
Namespace: DevCase.Win32.EnumsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[FlagsAttribute]
public enum SectionAttributes
<FlagsAttribute>
Public Enumeration SectionAttributes
Dim instance As SectionAttributes
[FlagsAttribute]
public enum class SectionAttributes
[<FlagsAttribute>]
type SectionAttributes
No code example is currently available or this language may not be supported.
Image |
16,777,216 |
Specifies that the file that the hFile parameter specifies is an executable image file.
The Image attribute must be combined with a
page protection value such as ReadOnly.
However, this page protection value has no effect on views of the executable image file.
Page protection for views of an executable image file is determined by the executable file itself.
No other attributes are valid with Image.
|
Reserve |
67,108,864 |
If the file mapping object is backed by the operating system paging file,
specifies that when a view of the file is mapped into a process address space,
the entire range of pages is reserved for later use by the process rather than committed.
Reserved pages can be committed in subsequent calls to the VirtualAlloc(IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function.
After the pages are committed, they cannot be freed or decommitted with the VirtualFree(IntPtr, IntPtr, MemoryFreeType) function.
Reserve cannot be combined with Commit.
|
Commit |
134,217,728 |
If the file mapping object is backed by the operating system paging file,
specifies that when a view of the file is mapped into a process address space,
the entire range of pages is committed rather than reserved.
The system must have enough committable pages to hold the entire mapping. Otherwise, CreateFileMapping fails.
This attribute has no effect for file mapping objects that are backed by executable image files or data files.
Commit cannot be combined with Reserve.
If no attribute is specified, Commit is assumed.
|
NoCache |
268,435,456 |
Sets all pages to be non-cachable.
Applications should not use this attribute except when explicitly required for a device.
Using the interlocked functions with memory that is mapped with
NoCache can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception.
NoCache requires either the
Reserve or Commit attribute to be set.
|
ImageNoExecute |
285,212,672 |
Specifies that the file that the hFile parameter specifies is an
executable image file that will not be executed and the loaded image file will have no forced integrity checks run.
Additionally, mapping a view of a file mapping object created with the
ImageNoExecute attribute will not invoke driver callbacks
registered using the PsSetLoadImageNotifyRoutine kernel API.
The ImageNoExecute attribute must be combined with the
ReadOnly page protection value.
No other attributes are valid with ImageNoExecute.
|
WriteCombine |
1,073,741,824 |
Sets all pages to be write-combined.
Applications should not use this attribute except when explicitly required for a device.
Using the interlocked functions with memory that is mapped with
WriteCombine can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception.
WriteCombine requires either the
Reserve or Commit attribute to be set.
|
LargePages |
2,147,483,648 |
Enables large pages to be used for file mapping objects that are backed by the operating system paging file.
This attribute is not supported for file mapping objects that are backed by executable image files or data files.
The maximum size of the file mapping object must be a multiple of the minimum size of a
large page returned by the GetLargePageMinimum function.
If it is not, CreateFileMappingFromApp fails.
When mapping a view of a file mapping object created with LargePages,
the base address and view size must also be multiples of the minimum large page size.
LargePages requires the
LockMemoryPrivilege privilege to be enabled in the caller's token.
LargePages requires the Commit attribute to be set.
|