Questions tagged [virtual-memory]
The virtual-memory tag has no summary.
422 questions
2
votes
1
answer
59
views
Are the page tables of the process preempted swapped out if there is a dearth of memory for new process
Suppose process A has been preempted to allow process B to run. If system memory is low and the kernel needs to reclaim memory for process B, is it possible for the page tables of process A to be ...
0
votes
0
answers
227
views
Firefox died with "__vm_enough_memory: not enough memory for the allocation" despite several GB of free RAM and swap
I am working on a laptop with 16 GB of non-upgradable RAM on Linux Mint 22, kernel 6.8.0-63-generic #66-Ubuntu. I created a 32 GB swap partition on my NVMe drive with a high swappiness value [note1] ...
10
votes
3
answers
1k
views
Why can ZONE_NORMAL only go up to 896MiB on 32-bit x86 processors?
According to Linux Kernel Development by Robert Love, p. 233:
Because of hardware limitations, the kernel cannot treat all pages as identical. Some pages, because of their physical address in memory, ...
0
votes
0
answers
69
views
qemu/kvm kvm_page fault for EPT violation VM-exits
I've a qemu/kvm VM started with the option -overcommit mem-lock=on at qemu-system_x86_64 command line on a Linux Ubuntu system.
From QEMU documentation and Intel tuning, my understanding is that, as ...
8
votes
2
answers
638
views
fork() Causes DMA Buffer in Physical Memory to Retain Stale Data on Subsequent Writes
I'm working on a C++ application on Ubuntu 20.04 that uses PCIe DMA to transfer data from a user-space buffer to hardware. The buffer is mapped to a fixed 1K physical memory region via a custom ...
0
votes
0
answers
55
views
How does paging start in a kernel?
If an allocator requires paging to have been set up already, that means that paging must be setup without an allocator, no? So where is the page table put?
0
votes
1
answer
127
views
When memory is allocated using kmalloc, is a virtual memory address with an already established PTE (Page Table Entry) returned?
When memory is allocated via kmalloc (i.e., slab cache allocation like slab_alloc_node), it returns a virtual memory address. Presumably, when accessing this virtual address, the corresponding PTE (...
0
votes
1
answer
141
views
Writable and executable memory regions
I wrote a simple Python script to scan /proc/{pid}/maps for regions that are writable and executable on my computer. It came up with a few hits surprisingly, all private anonymous. Wondering why a ...
0
votes
2
answers
144
views
What happens if the kernel uses more than 1gb?
I am learning about operating systems and there are two things I would like to know.
Assuming that the address space division is 1/3 gb (1gb for the kernel and 3gb for the process).
What happens if ...
0
votes
0
answers
44
views
Solaris 10 g++ virtual memory exhausted
I am trying to use the cm3-unix64le-d5.11.1-20210610 from the Modula 3 github. i am running the .cpp file and I get a virtual memory exhausted: Not enough space error. I have 16GB of RAM and I'm ...
1
vote
1
answer
191
views
Why is the stack segment not explicit in ELF files?
Everything mapped in memory is explicit in ELF files except the stack segment. The stack segment is mapped automatically.
Why is the stack segment not like other segments, with explicit settings in ...
0
votes
1
answer
66
views
How does each pointer within a page directory table able to point to ITS OWN page directory table?
I'm trying to figure one thing out. I understand that, say, for a 64-bit system that there is a 9 bit split which is used to index a 512 entries page directory table, like the PGD, or PMD, etc...
What ...
0
votes
1
answer
36
views
Is an individual pointer within a page table indexed the same way as any other logical address?
I have found the following diagrams while researching how paging works in Linux.
+-----+
| PGD |
+-----+
|
| +-----+
+-->| P4D |
+-----+
|
| +-----+
...
0
votes
0
answers
37
views
Is WSClock or a variant used in any Linux distribution?
I’ve been researching page replacement algorithms and came across WSClock, which combines the Clock algorithm with working set principles.
Now I have the following questions:
Is WSClock implemented ...
1
vote
0
answers
173
views
What is the purpose and difference of PGD, PUD, PMD, and PTE entries involved in paging?
As I understand it, a 48-bit virtual linear address's top 36 bits is split into four groups of 9 bits which each virtual linear address is indexed. Going from PGD, to PUD, to PMD, and then to PTE.
...