"Go" memory allocation granularity vs memory paging size vs memory space

Source: Internet
Author: User

Original address

Allocation granularity: Indicates the minimum allocation for each memory request, such as a 32-bit operating system that basically allocates 64K of size each time. Paging Size: Represents the size of the page, the 32-bit operating system is 4K is the smallest unit of memory management.
= 4K + 2K of space, the operating system will allocate a 64K of space at a time, and because the minimum memory operating unit is 4K, so you actually assigned the 8K=4K +  4 K, the rest of the 56K is left to you.
The WIN32 operating system allocates 4G of memory space per process, program code, and constant volume are allocated in this 4G memory space. is the memory space mentioned here to be a concept with memory-bar memory? What if the auxiliary disk is less than 2G? The memory here is logical, that is, virtual. is not a physical memory space. The actual implementation of the logical memory when the physical memory is not sufficient to use secondary storage (hard disk). Some people naturally ask: since you can use the secondary virtual, then each process does not want to how big virtual memory? This is not the case, the 32-bit machine determines the memory address space can only be 2 of the 32, that is, 4G if the program actually requires more memory than virtual memory (although not reaching 4G), Windows will appear in the bottom right of a yellow triangle inside there is an exclamation mark. Indicates that virtual memory is low, You set the virtual memory to a larger value. If not set, or if you say that the hard disk is less than 4G will automatically terminate the process can not stop the crash. I ran into it when I was using RAMDisk under Vista.

"Go" memory allocation granularity vs memory paging size vs memory space

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.