Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

MEMORYSTATUS (Structures)
 
.
Summary
Contains information about the current state of both physical and virtual memory.

C# Definition:

     /// <summary>
    /// The MEMORYSTATUS structure contains information about the current state of both physical and virtual memory.
    /// </summary>
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    public class MEMORYSTATUS
    {
        /// <summary>
        /// Size of the MEMORYSTATUS data structure, in bytes. You do not need to set this member before calling the GlobalMemoryStatus function; the function sets it.
        /// </summary>
        public uint dwLength;

        /// <summary>
        /// Number between 0 and 100 that specifies the approximate percentage of physical memory that is in use (0 indicates no memory use and 100 indicates full memory use).
        /// Windows NT:  Percentage of approximately the last 1000 pages of physical memory that is in use.
        /// </summary>
        public uint dwMemoryLoad;

        /// <summary>
        /// Total size of physical memory, in bytes.
        /// </summary>
        public uint dwTotalPhys;

        /// <summary>
        /// Size of physical memory available, in bytes
        /// </summary>
        public uint dwAvailPhys;

        /// <summary>
        /// Size of the committed memory limit, in bytes.
        /// </summary>
        public uint dwTotalPageFile;

        /// <summary>
        /// Size of available memory to commit, in bytes.
        /// </summary>
        public uint dwAvailPageFile;

        /// <summary>
        /// Total size of the user mode portion of the virtual address space of the calling process, in bytes.
        /// </summary>
        public uint dwTotalVirtual;

        /// <summary>
        /// Size of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process, in bytes.
        /// </summary>
        public uint dwAvailVirtual;

    } // class MEMORYSTATUS

VB Definition:

      ''' <summary>
      ''' The MEMORYSTATUS structure contains information about the current state of both physical and virtual memory.
      ''' </summary>
      <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
      Public Class MEMORYSTATUS
        ''' <summary>
        ''' Size of available memory to commit, in bytes.
        ''' </summary>
        Public dwAvailPageFile As UInt32
        ''' <summary>
        ''' Size of physical memory available, in bytes
        ''' </summary>
        Public dwAvailPhys As UInt32
        ''' <summary>
        ''' Size of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process, in bytes.
        ''' </summary>
        Public dwAvailVirtual As UInt32
        ''' <summary>
        ''' Size of the MEMORYSTATUS data structure, in bytes. You do not need to set this member before calling the GlobalMemoryStatus function; the function sets it.
        ''' </summary>
        Public dwLength As UInt32
        ''' <summary>
        ''' Number between 0 and 100 that specifies the approximate percentage of physical memory that is in use (0 indicates no memory use and 100 indicates full memory use).
        ''' Windows NT:  Percentage of approximately the last 1000 pages of physical memory that is in use.
        ''' </summary>
        Public dwMemoryLoad As UInt32
        ''' <summary>
        ''' Size of the committed memory limit, in bytes.
        ''' </summary>
        Public dwTotalPageFile As UInt32
        ''' <summary>
        ''' Total size of physical memory, in bytes.
        ''' </summary>
        Public dwTotalPhys As UInt32
        ''' <summary>
        ''' Total size of the user mode portion of the virtual address space of the calling process, in bytes.
        ''' </summary>
        Public dwTotalVirtual As UInt32
      End Class

User-Defined Field Types:

None.

Notes:

Also see MEMORYSTATUSEX, GlobalMemoryStatus, GlobalMemoryStatusEx.

Documentation

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions