Get available computer memory memorystatus

Source: Internet
Author: User

// This structure contains the details of physical memory and virtual memory
Memorystatus mem_stat;
Mem_stat.dwlength = sizeof (memorystatus );
// Obtain the memory status
Globalmemorystatus (& mem_stat );

Structure member description:
The size of the dwlength memorystatus structure, which is obtained by using the sizeof () function before calling the globalmemorystatus function for the function to detect the structure version.
Dwmemoryload returns a value ranging from 0 ~ Value between 100 to indicate the current system memory usage.
Dwtotalphys returns the total physical memory size, in bytes.
Dwavailphys returns the available physical memory size, in bytes.
Dwtotalpagefile displays the number of bytes that can exist in the page file. Note that this value does not indicate the actual physical size of the page file on the disk.
Dwavailpagefile returns the Available page file size, in bytes.
Dwtotalvirtual returns all available virtual address spaces in the user mode of the calling process, in bytes.
Dwavailvirtual returns the free virtual address space of the user mode part of the calling process, in bytes.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.