virtual-memory

Why do x86-64 systems have only a 48 bit virtual address space?

时光毁灭记忆、已成空白 提交于 2019-11-26 08:48:45
问题 In a book I read the following: 32-bit processors have 2^32 possible addresses, while current 64-bit processors have a 48-bit address space My expectation was that if it\'s a 64-bit processor, the address space should also be 2^64. So I was wondering what is the reason for this limitation? 回答1: Because that's all that's needed. 48 bits give you an address space of 256 terabyte. That's a lot. You're not going to see a system which needs more than that any time soon. So CPU manufacturers took a

Why in 64bit the virtual address are 4 bits short (48bit long) compared with the physical address (52 bit long)?

北战南征 提交于 2019-11-26 08:38:58
In the book "Low-Level Programming: C, Assembly, and Program Execution on Intel® 64 Architecture" I read: Each virtual 64-bit address (e.g., ones we are using in our programs) consists of several fields. The address itself is in fact only 48 bits wide; it is sign-extended to a 64-bit canonical address. Its characteristic is that its 17 left bits are equal. If the condition is not satisfied, the address gets rejected immediately when used. Then 48 bits of virtual address are transformed into 52 bits of physical address with the help of special tables. Why is the difference in 4 bits between the

64 bit large mallocs

怎甘沉沦 提交于 2019-11-26 08:29:22
问题 What are the reasons a malloc() would fail, especially in 64 bit? My specific problem is trying to malloc a huge 10GB chunk of RAM on a 64 bit system. The machine has 12GB of RAM, and 32 GB of swap. Yes, the malloc is extreme, but why would it be a problem? This is in Windows XP64 with both Intel and MSFT compilers. The malloc sometimes succeeds, sometimes doesn\'t, about 50%. 8GB mallocs always work, 20GB mallocs always fail. If a malloc fails, repeated requests won\'t work, unless I quit

What are the differences between virtual memory and physical memory?

假如想象 提交于 2019-11-26 06:12:13
问题 I am often confused with the concept of virtualization in operating systems. Considering RAM as the physical memory, why do we need the virtual memory for executing a process? Where does this virtual memory stand when the process (program) from the external hard drive is brought to the main memory (physical memory) for the execution. Who takes care of the virtual memory and what is the size of the virtual memory? Suppose if the size of the RAM is 4GB (i.e. 2^32-1 address spaces) what is the

Why in 64bit the virtual address are 4 bits short (48bit long) compared with the physical address (52 bit long)?

那年仲夏 提交于 2019-11-26 02:00:38
问题 In the book \"Low-Level Programming: C, Assembly, and Program Execution on Intel® 64 Architecture\" I read: Each virtual 64-bit address (e.g., ones we are using in our programs) consists of several fields. The address itself is in fact only 48 bits wide; it is sign-extended to a 64-bit canonical address. Its characteristic is that its 17 left bits are equal. If the condition is not satisfied, the address gets rejected immediately when used. Then 48 bits of virtual address are transformed into

How does x86 paging work?

荒凉一梦 提交于 2019-11-26 01:26:04
问题 This question is meant to fill the vacuum of good free information on the subject. I believe that a good answer will fit into one big SO answer or at least in a few answers. The main goal is to give complete beginners just enough info so that they can take the manual on their own, and be able to understand basic OS concepts related to paging. Suggested guidelines: answers should be beginner friendly: concrete, but possibly simplified examples are very important applications of the concepts

Virtual Memory Usage from Java under Linux, too much memory used

≯℡__Kan透↙ 提交于 2019-11-26 00:26:22
问题 I have a problem with a Java application running under Linux. When I launch the application, using the default maximum heap size (64 MB), I see using the tops application that 240 MB of virtual Memory are allocated to the application. This creates some issues with some other software on the computer, which is relatively resource-limited. The reserved virtual memory will not be used anyway, as far as I understand, because once we reach the heap limit an OutOfMemoryError is thrown. I ran the