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
0
votes
1 answer

Why is 38 written as 9 + 9 + 9 +12 - 1 in xv6 RISC-V source code

I was trying to add a few system calls to the xv6 source code developed at MIT, and upon reading this resource (https://pdos.csail.mit.edu/6.S081/2020/xv6/book-riscv-rev1.pdf), on page 26, they consider the maximum possible virtual address that…
0
votes
0 answers

why does kernel image and direct mapping overlap in physical address space?

below is the implementation of transforming virtual addr to physical addr of kernel space. However, by this way the kernel image and direct mapping have overlapped area in physical space. Is this way of mapping designed by purpose? unsigned long…
choxsword
  • 3,187
  • 18
  • 44
0
votes
2 answers

How much memory does a 64bit Linux Kernel take up?

The address space is huge for the x86-64 even though 48-bit addresses are mainly used. On x86 32-bit machines it was pretty clear how much RAM the kernel took up. Generally around 1 GB of ZONE_NORMAL is on the bottom of memory while everything else…
0
votes
1 answer

How come the allocation of virtual address spaces doesn't rob you of all virtual memory?

On a 32-bit computer, a virtual memory address is represented as an integer between 0 and 2^32. By virtue of being a 32-bit system, no address can be represented that's lower than 0 or higher than 2^32, and we therefore have a total of 4 GiB (2^32…
0
votes
2 answers

[windows]: something about the mapping between elf and vas

I read something from wiki about Virtual Address Space (VAS). One thing I don't understand, I'm not sure whether I understand it correctly. Here is it: the application's EXE file is mapped into the VAS. Addresses in the process VAS are mapped to…
Alcott
  • 17,905
  • 32
  • 116
  • 173
0
votes
2 answers

Why is cuMemAddressReserve() failing with CUDA_INVALID_VALUE?

Consider the following program (written in C syntax): #include #include #include int main() { CUresult result; unsigned int init_flags = 0; result = cuInit(init_flags); if (result != CUDA_SUCCESS) {…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
1 answer

Intel cache Address

Here is the L3 cache (shared) configuration on my Intel Xeon Silver 4210R CPU- $ getconf -a | grep LEVEL3_CACHE LEVEL3_CACHE_SIZE 14417920 LEVEL3_CACHE_ASSOC 11 LEVEL3_CACHE_LINESIZE 64 This…
0
votes
0 answers

Why virtual address memory 0xXX 0x90 0x04 0x08 and 0xXX 0x80 0x04 0x08 have same behavior?

The following bytes do the hello world (x86 LE, code part of elf file) : [0xba, 0x09, 0x00, 0x00, 0x00],// edx len [0xb9, 0xa4, 0x90, 0x04, 0x08],// ecx msg [0xbb, 0x01, 0x00, 0x00, 0x00],// mov ebx 1 [0xb8, 0x04, 0x00, 0x00, 0x00],// mov eax…
8HoLoN
  • 1,122
  • 5
  • 14
0
votes
1 answer

Lower reserved portion of virtual address space

I have been studying x86-64 assembly and the memory layout of programs. I have run into examples of the virtual address space of a program where the lower portion (0x00000000-0x00010000) is marked as reserved. But I cannot find an explanation for…
TPens
  • 59
  • 2
0
votes
0 answers

Fetching data from running application

Is there an efficient method to find specific data in the memory of a running application on Linux? So far, I found that I can use /proc/[pid]/maps to access the memory of the running application. But how can I find specific data in it? For example,…
0
votes
1 answer

How does entire physical address space is mapped in virtual address space?

I have read that in XV6, in every process virtual address space entire physical address space is mapped. How is that even possible?
0
votes
1 answer

How to find the number of translation tables in a virtual memory?

I have the following information: I'm trying to build a valid VM address with that information. I understand that the offset is 11 bits. I'm trying to figure out what is the number of translation tables are needed for the address. In the answers it…
vesii
  • 2,760
  • 4
  • 25
  • 71
0
votes
1 answer

How are virtual addresses corresponding to kernel stack mapped?

Each process's virtual address space comprises of user space and kernel space. As pointed out by many articles, the kernel space of all processes is mapped to same physical address in memory i.e. there is only one kernel in the physical memory. But…
0
votes
2 answers

How to distinguish out of memory versus out of address space in C on Linux?

Suppose I'm running a piece of code on a 32 bit CPU and plenty of memory. And a process uses mmap to map a total of 2.8GB worth of file into it's address space. Then the process tries to allocate 500MB of memory using malloc. The allocation is…
0
votes
0 answers

Since the virtual address space is so large in 32 bit machines, can the stack and heap ever meet each other?

I think of stack and heap as referring to different sections of a process' virtual memory, where one grows upwards and the other downwards. Physical memory addresses (in the form of pages) are mapped to these virtual addresses. AFAIK, the addressing…