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
90
votes
7 answers

How much memory can a 32 bit process access on a 64 bit operating system?

On Windows, under normal circumstances a 32 bit process can only access 2GB of RAM (or 3GB with a special switch in the boot.ini file). When running a 32 bit process on a 64 bit operating system, how much memory is available? Are there any special…
jjxtra
  • 20,415
  • 16
  • 100
  • 140
48
votes
2 answers

Understanding Virtual Address, Virtual Memory and Paging

I've been learning these topics and read many articles and books but they all lack some complementary information and confused me even more. So here, I’d like to explain what I know while I am asking my questions. Hopefully, this topic will be…
Tarik
  • 79,711
  • 83
  • 236
  • 349
47
votes
5 answers

Is there any API for determining the physical address from virtual address in Linux?

Is there any API for determining the physical address from virtual address in Linux operating system?
42
votes
3 answers

Drawbacks of using /LARGEADDRESSAWARE for 32-bit Windows executables?

We need to link one of our executables with this flag as it uses lots of memory. But why give one EXE file special treatment. Why not standardize on /LARGEADDRESSAWARE? So the question is: Is there anything wrong with using /LARGEADDRESSAWARE even…
41
votes
13 answers

Why does a 32-bit OS support 4 GB of RAM?

Just reading some notes in a purdue lecture about OSs, and it says: A program sees memory as an array of bytes that goes from address 0 to 2^32-1 (0 to 4GB-1) Why 4 GB?
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
34
votes
1 answer

Physical or virtual addressing is used in processors x86/x86_64 for caching in the L1, L2 and L3?

Which addressing is used in processors x86/x86_64 for caching in the L1, L2 and L3(LLC) - physical or virtual(using PT/PTE and TLB) and somehow does PAT(page attribute table) affect to it? And is there difference between the drivers(kernel-space)…
Alex
  • 12,578
  • 15
  • 99
  • 195
26
votes
2 answers

Why is the ELF execution entry point virtual address of the form 0x80xxxxx and not zero 0x0?

When executed, program will start running from virtual address 0x80482c0. This address doesn't point to our main() procedure, but to a procedure named _start which is created by the linker. My Google research so far just led me to some (vague)…
Michael L.
  • 263
  • 1
  • 3
  • 5
24
votes
2 answers

Disable and re-enable address space layout randomization only for myself

I would like to disable address space layout randomization (ASLR) on my system (Ubuntu Gnu/Linux 2.6.32-41-server), but, if I use sysctl -w kernel.randomize_va_space=0 the change would affect all users on the system, I presume. (Is this true?) …
Amittai Aviram
  • 2,270
  • 3
  • 25
  • 32
22
votes
1 answer

GDB examine memory permissions

I've an address in memory and I want to find out the permissions (r/w/x) of that memory address. E.g. char *s = "hello"; Here, the string literal "hello" is stored in read-only memory. When running the program through gdb, is there a possibility to…
viji
  • 2,706
  • 5
  • 28
  • 34
21
votes
2 answers

Multi-level page tables - hierarchical paging

Example question from a past operating system final, how do I calculate this kind of question? A computer has a 64-bit virtual address space and 2048-byte pages. A page table entry takes 4 bytes. A multi-level page table is used because each table…
Bobby S
  • 4,006
  • 9
  • 42
  • 61
21
votes
6 answers

How to translate a virtual memory address to a physical address?

In my C++ program (on Windows), I'm allocating a block of memory and can make sure it stays locked (unswapped and contiguous) in physical memory (i.e. using VirtualAllocEx(), MapUserPhysicalPages() etc). In the context of my process, I can get the…
Roy
20
votes
3 answers

x86-64 canonical address?

During reading of an Intel manual book I came across the following: On processors that support Intel 64 architecture, the IA32_SYSENTER_ESP field and the IA32_SYSENTER_EIP field must each contain a canonical address. What is a 'canonical address'?
Rouki
  • 2,239
  • 1
  • 24
  • 41
20
votes
5 answers

Why does Windows reserve 1Gb (or 2 Gb) for its system address space?

It's a known fact that Windows applications usually have 2Gb of private address space on a 32bit system. This space can be extended to 3Gb with the /3Gb switch. The operating system reserves itself the remaining of the 4Gb. My question is WHY? Code…
Rivari
19
votes
2 answers

How remap_pfn_range remaps kernel memory to user space?

remap_pfn_range function (used in mmap call in driver) can be used to map kernel memory to user space. How is it done? Can anyone explain precise steps? Kernel Mode is a privileged mode (PM) while user space is non privileged (NPM). In PM CPU can…
19
votes
1 answer

Where are the stacks for the other threads located in a process virtual address space?

The following image shows where the sections of a process are laid out in the process's virtual address space (in Linux): You can see that there is only one stack section (since this process only has one thread I assume). But what if this process…
John
  • 1,049
  • 1
  • 14
  • 34
1
2 3
15 16