Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 4
System
Environment Class
 SystemPageSize Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
.NET Framework Class Library
Environment..::.SystemPageSize Property

Gets the amount of memory for an operating system's page file.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)
Visual Basic
Public Shared ReadOnly Property SystemPageSize As Integer
C#
public static int SystemPageSize { get; }
Visual C++
public:
static property int SystemPageSize {
    int get ();
}
F#
static member SystemPageSize : int

Property Value

Type: System..::.Int32
The number of bytes in a system page file.

This information can be useful when determining whether to use the MemoryMappedFileOptions..::.DelayAllocatePages option when you work with memory-mapped files.

In Windows, this value is the dwPageSize member in the SYSTEM_INFO structure.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Doesn't work on 64 bit systems      just.a.nerd ... Thomas Lee   |   Edit   |   Show History

Since this is an Int32 value, it returns 0 (zero) on 64 bit systems.

Actually odd why this property is added to .net 4, just when it's outdated (systems become 64 bit)


[tfl] The above is incorrect. The page size is 4096 bytes, which fits well into a 32-bit integer and works on a 64-bit system.


Here is sample from my workstation:

PSH [C:\foo]: [system.environment]::SystemPageSize
4096

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker