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
2 answers

What data type should the buffer be for ReadProcessMemory?

In all the examples I've seen the third parameter or the buffer is an integer but I'm not quite sure wtf this value is supposed to represent or how it's useful in anyway so I tried a char array and got random garbage so I'm curious as to what this…
0
votes
1 answer

Address spaces for ROM's and finding out the virtual address of certain files

Thanks for reading this question. I am very new to arm and computer architectures in general so sorry if this is a basic question. I have spent plenty of time reading and learning about the MMU and the virtual to physical address translation. I have…
0
votes
0 answers

Translating virtual address to physical address in kernel space

How to convert virtual address to physical address in kernel space? Using : #include phys_addr = virt_to_phys(virt_addr); virt_addr = phys_to_virt(phys_addr); bus_addr = virt_to_bus(virt_addr); virt_addr = bus_to_virt(bus_addr);
user4205787
0
votes
1 answer

NACHOS virtual memory and cache implementation

I am doing NACHOS phase 3 project (Caching and Virtual Memory) in java. I have some confusions in implementing the function given below: /** * Restore the state of this process after a context switch. Called by * UThread.restoreState() */ public…
0
votes
2 answers

Virtual memory and memory management unit

Why do we need the memory management unit? It seems the only task of the memory management unit is to convert virtual addresses to physical address. Can't this be done in software? Why do we need another hardware device to this?
user1764917
0
votes
2 answers

How to convert a Virtual address to Physical Address?

if i have a Virtual Address: 0xF3557100 , how do i convert it to Physical Address and what are the Values of Offset, Page Directory and Page Table ? The PTE (page table entry) for that address has the value 0x87124053 thnx
Al Bert
  • 1
  • 4
0
votes
1 answer

ELF and virtual address in C

I am studying for a test, and I have the following question: In the ELF header it is said that the file's entry point is at 0x8049058 the code is: section .data x: dd 3 _start: mov ecx, [x] ... ... ... ;more code Q: what will…
lolu
  • 370
  • 4
  • 20
0
votes
1 answer

strcpy with size bigger than malloc

This was a question from an exam : does this code always works ? the answer is : the if statement checks if the virtual address of 'str' is pointed to the beginning of a page, only then the strcpy should be executed and it will work because the…
Rawhi
  • 6,155
  • 8
  • 36
  • 57
0
votes
1 answer

nm versus gdb break

I am working on Ubuntu 14.04 LTS. I have an executable file exec compiled from file.c. The file.c makes use of functions from a static library. For example, let's says that fubar() is a function of the static library that is used in file.c. This is…
progammer
  • 1,951
  • 11
  • 28
  • 50
0
votes
2 answers

Assembly instruction address

Why every time when I disassembly the same .exe file the same instruction is in the same address? And what address is that(RAM? HDD? Virtual?)?
Narek
  • 38,779
  • 79
  • 233
  • 389
0
votes
1 answer

Calculate Level 2 page table bits and page table entries for each

Level 1 page table occupies exactly one page of memory 32 bit virtual address Page size 8kb PTE 4 bytes How many bits for each of the fields? How many entries are in the level 1 table? How many entries are in the level 2 table? How many pages do…
0
votes
1 answer

LoadLibrary() fails with error 8 (ERROR_NOT_ENOUGH_MEMORY)

Later edit: After more investigation, the Windows Updates and the OpenGL DLL were red herrings. The cause of these symptoms was a LoadLibrary() call failing with GetLastError() == ERROR_NOT_ENOUGH_MEMORY. See my answer for how to solve such issues.…
0
votes
0 answers

How to verify which index of a global array was accessed from another program?

There is program running which has globally initialized large arrays. I want to verify which index of that large array is getting accessed from another program running in the same machine simultaneously. I saw how to get a set of pages in the…
Ayan Banerjee
  • 121
  • 2
  • 12
0
votes
2 answers

Why the memory not freed will cause leaking ? and some other questions

As I know, all processes run within its own virtual address space. If a process call malloc, OS will allocate some region from the heap owned by the program, and return an address which is a virtual address not a real physical address. As the heap…
river
  • 694
  • 6
  • 22
0
votes
1 answer

Why in address space's private regions so many zero bytes?

I'm examining process's address space under windows. When i see content of private regions, i wonder, because there are so many zero bytes (in some regions more than 95%). If more of private regions don't used while application is running, why they…