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
1
vote
1 answer

How are page tables generated by the operating system, per process?

I know each process has it own virtual address space. A table is generated per process to map the virtual address to a physical address which resides in physical memory (called pages). When trying to access an address say 0x123, the address is…
Dan
  • 577
  • 1
  • 3
  • 9
1
vote
1 answer

Do different virtual machines running on one VMM share guest physical address space?

I recall reading about how different VMs running on the same VMM (obviously) have their own independent (guest) virtual address space but they all 'share' one (guest) physical address space. That is, if a process in VM1 has its virtual address…
1
vote
1 answer

Understanding base addresses in VirtualAlloc

In my application I'm trying to allocate a large block of memory (approximately 1GB-2GB) through VirtualAlloc on startup that I can then later divide up for use throughout the rest of the application. When in debug mode I want to pass a base…
1
vote
1 answer

Can virtual memory be used to support Data Breakpoint feature in i386?

I was lurking around my OS textbook and it mentioned that virtual address translation can be implemented on data breakpoint (for program debugging). I only know that the debugger uses INT 3 to pause the program, local and global variables being…
1
vote
0 answers

x86_64 : Use 40 bit addressing instead of 48 bit addressing

I have a Linux x86 application built as a shared library(.so) . I see that addresses of global variables and structures in my code are all 48 bit since x86_64 uses 48 bit virtual addresses. I have certain structures in my code that can only…
hektor
  • 1,017
  • 3
  • 14
  • 28
1
vote
1 answer

GDB Backtrace Containing Similar Addresses but Different Source Lines

I was trying to debug inkscape and put a breakpoint at an address in its main shared library (i.e., /usr/lib/inkscape/libinkscape_base.so). When the execution reached that breakpoint, the backtrace was as follows: #0 0x00007ffff6ecb220 in…
1
vote
3 answers

Can you delete dynamically allocated memory from a separate program?

This question is out of pure curiosity. I recently learnt that it is very important to delete memory space if it is dynamically allocated in the Heap. My question, is it possible to delete the dynamically allocated memory space using a different C++…
Sujit
  • 1,653
  • 2
  • 9
  • 25
1
vote
1 answer

VirtualAlloc a writeable, unbacked "throw-away" garbage range?

Is it possible in Win32 to get a writeable (or write-only) range of "garbage" virtual address space (i.e., via VirtualAlloc, VirtualAlloc2, VirtualAllocEx, or other) that never needs to be persisted, and thus ideally is never backed by physical…
Glenn Slayden
  • 17,543
  • 3
  • 114
  • 108
1
vote
1 answer

How can I dump memory from an arbitrary virtual address, ignoring SIGSEGV

I'm looking for a way to iterate over memory and print it (or do anything with it really), but if the virtual address hasn't been allocated I'll get a segfault. How can I attempt to read arbitrary addresses in my program and not crash? This is…
jozxyqk
  • 16,424
  • 12
  • 91
  • 180
1
vote
1 answer

File Systems - Memory-Mapped Files

An example final question for my operating systems class: Most operating systems support "memory-mapped files"; this describes files which are mapped into the address space of a running process. Reads and writes to the file are converted into…
1
vote
1 answer

Is it possible to expand a gap buffer without copying data?

I was reading this overview of some possible data structures for storing a sequence of characters for the purposes of a text editor. One popular and efficient way is the gap buffer. When the gap buffer fills up so that there is no longer a gap, the…
1
vote
1 answer

How can a 32 bit CPU with 32 bit word size utilise 4 GB of RAM?

I have seen some explanations for my question online however, i still don't feel like i understand the problem at hand. I understand that a 32 bit CPU will have its memory divided up into discrete units called words, which can each store up to 32…
weary27
  • 11
  • 1
1
vote
1 answer

User-space address at 0xfff

I'm debugging a simple program on gdb, and I see addresses for local variables inside the stack frame that look like the following -- 0xffffbc10, 0xffffc340, etc. It was my understanding that kernel-space addresses take up 0xffffffff to 0xcfffffff,…
aspen100
  • 965
  • 11
  • 22
1
vote
1 answer

Translate virtual address to physical from multi-level pagetabels

I'm trying to convert an virtual memory address to a physical one, but can't get it to work. I'm currently doing an operating system as an assignment, and now I have to implement a printf function for the usermode, so when you invoke the write…
1
vote
1 answer

How are memory segment permissions set in Linux x86_64 and x86

I've been trying to figure this out for awhile now. I've read that Linux uses paging and DEP is enforced by marking a page as non executable. But what about the permissions read/write? How does the global descriptor table and segment registers come…