Questions tagged [virtual-address-space]

virtual address space (VAS) or address space is the set of ranges of virtual addresses that an operating system makes available to a process

A virtual address does not represent the actual physical location of an object in memory; instead, the system maintains a page table for each process, which is an internal data structure used to translate virtual addresses into their corresponding physical addresses. Each time a thread references an address, the system translates the virtual address to a physical address.

A virtual address space (VAS) or address space is the set of ranges of virtual addresses that an operating system makes available to a process.[1] The range of virtual addresses usually starts at a low address and can extend to the highest address allowed by the computer's instruction set architecture. This provides several benefits, one of which is, if each process is given a separate address space, security through process isolation.

http://en.wikipedia.org/wiki/Virtual_address_space
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366912(v=vs.85).aspx

234 questions
19
votes
2 answers

Why can we allocate a 1 PB (10^15) array and get access to the last element, but can't free it?

As known: http://linux.die.net/man/3/malloc By default, Linux follows an optimistic memory allocation strategy. This means that when malloc() returns non-NULL there is no guarantee that the memory really is available. In case it turns out that…
Alex
  • 12,578
  • 15
  • 99
  • 195
19
votes
6 answers

How are same virtual address for different processes mapped to different physical addresses

I have taken a course about Operating System design and concept and now I am trying to study Linux kernel thoroughly. I have a question that I cannot get rid of. In modern operating systems each process has own virtual address space(VAS) (eg, 0 to…
dirtybit
  • 658
  • 7
  • 16
19
votes
4 answers

Which is the address printed by printf() with a %p format in c?

I'm having simple code as follows: #include int glob; int main(void) { int a; printf("&a is : %p \n", &a); printf("glob is : %p \n", &glob); return 0; } Output of above program is: First run: &a is : 0x7fff70de91ec glob is :…
BSalunke
  • 11,499
  • 8
  • 34
  • 68
15
votes
2 answers

Understanding virtual address and virtual address space

I read that , "When a program executes an instruction like : MOV REG,1000 , it does so to copy the contents of the memory address 1000 to REG. Address can be generated using indexing,base registers,segment registers and other ways. These program…
15
votes
3 answers

how to check if exe is set as LARGEADDRESSAWARE

I am developing a C# program that will load files and get information such as loaded file created date, modification date, size etc. Another thing that I need to know is whether the loaded file (executable.exe) is linked with the LARGEADDRESSAWARE…
harrygg
  • 664
  • 1
  • 7
  • 12
9
votes
6 answers

Virtual address space in 64 bit systems running in compatibility mode

I saw that on a 64 bit windows OS the user virtual address space available is 8 terra bytes. But if the program we are executing on this is running in 32 bit compatibility mode is this much of user space still available ? or does it behave like a…
Naveen
  • 74,600
  • 47
  • 176
  • 233
8
votes
1 answer

Unit Testing for x86 LargeAddressAware compatibility

For a win32 executable (x86) we can set the LargeAddressAware flag so it can access a virtual address space of 4 GB (instead of just 2 GB) when running on x64 Windows. This looks very appealing. However, there are risks involved. For example see:…
6
votes
3 answers

Virtual Address Space

I have started to learn about Virtual Address Space (VAS) and I have few questions: How much of VAS is created for each process depending on the architecture (32-bit and 64-bit)? Is VAS for each process created on hard disk? If so, what happens if…
6
votes
2 answers

Where does the OS store argv and argc when a child process is executed?

I'm having some difficulty understanding how the OS passes data from the address space of a parent process to the address space of a child process. Namely, in a C program, where is argc and argv stored upon being passed into main? I understand how…
6
votes
1 answer

What is the difference between these two functions: `ioremap_uc()` and `set_memory_uc`?

When I want to mark memory region as Write Combined (to disable cacheable and use BIU) or Uncacheable through set PAT(Page attribute table - 7bit in PTE), then what do I must to use, and what is the difference between two these functions? Drivers…
Alex
  • 12,578
  • 15
  • 99
  • 195
5
votes
1 answer

x86-64: canonical addresses and actual available range

Intel and AMD documentation says that for 64 bit mode only 48 bits are actually available for virtual addresses, and bits from 48 to 63 must replicate bit 47 (sign-extension). As far as I know, all current CPU are implemented this way, but nothing…
5
votes
1 answer

How does multilevel paging save memory?

I am confused with the concept of the multilevel paging scheme. Let a 32-bit virtual address and one page is of 4 KiB then I will have 220 pages/page table entries. Let one page table entry be of size 4 bytes, so the page table's size is 220 * 4…
Bishnu
  • 383
  • 4
  • 14
5
votes
1 answer

relationship between virtual memory and core dump

I have an executable file, and a gcore. I created core dump file with gcore. Now, I would like to map the virtual address of the executable file to the core dump. I know that the core dump is a memory dump of an executable file, and if I would like…
John Doyle
  • 898
  • 2
  • 9
  • 22
5
votes
2 answers

32 v/s 64 bit architecture - virtual address space

I am attending an OS course, wherein the instructor mentions 32 v/s 64 bit architectures. My understanding of this difference from my architecture class is that 32 bit v/s 64 bit indicates the CPU word size, the register size, and the size on which…
Jake
  • 16,329
  • 50
  • 126
  • 202
5
votes
1 answer

All the drivers in Linux works in the same context or in a different contexts?

All the drivers in the Linux running in the same context (address space of the kernel-space), or each in a different (similar to how the different processes work in a different address spaces in user-space)?
Alex
  • 12,578
  • 15
  • 99
  • 195
1
2
3
15 16