Windows Memory Allocation (1)

Source: Internet
Author: User
Windows Paging request virtual memory System. Now let's analyze this system.

Virtual Address Space

The concept of virtual memory was proposed in the 1950s S. It was used to solve the problem of not loading the actual memory at a time.ProgramProposed a solution for this complex problem. In a virtual memory system, a program can access a larger address set that exceeds the available physical memory. The dedicated memory manager maps these logical addresses to the actual addresses, use the temporary storage on the disk to save the excess parts.

In the modern virtual memory implementation used by windows, virtual storage is organized into large and small units, calledPage. Each operating system process occupies its ownVirtual Address SpaceIs a set of virtual memory pages that can be read and written. Each page can be in three states:

    • Free: No process has used this part of the address space. If you attempt to access this part of the space, read and write operations will invalidate some kind of runtime. This operation will pop up a Windows dialog box, prompting access conflict. (Java programs do not cause such errors. Only programs written in languages that support pointers can cause such errors .)

    • Retained: This part of the address space is reserved for future use by the process, but cannot be accessed before delivery. Many Java stacks are retained at the beginning.
    • Submit: The memory that the program can access is completelySupportedThat is, the page frame has been allocated to the paging file. The submitted page is loaded into the primary storage only when it is referenced for the first time.Request Paging.

Figure 1 illustrates how a virtual page in the process address space maps to a physical page frame in the memory.

Figure 1. ing between virtual pages and physical page frames in the process address space

If you are running a 32-bit machine (such as an Intel processor), the entire virtual address space of the process is 4 GB, because this is the maximum address space that can be addressed with 32 bits. Windows usually does not allow you to access all the memory in the address space. The process uses less than half of the memory, and the others are used by windows.

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.