Questions tagged [memory-management]
The memory-management tag has no usage guidance.
50
questions
0
votes
0
answers
61
views
What is the contribution of API to the memory usage of a process in linux as shown by pmap command?
I am trying to understand the memory usage of my program excluding the contribution of custom made API that creates and attaches to shared memory segment.
Following is the API code. I have included ...
1
vote
1
answer
57
views
Understanding memory limits in a systemd service: Are they per-process or combined?
I have a systemd service named vcoagent.service running on my Linux system, and I'm trying to understand how memory limits specified for the service (Memory: 300.3M (limit: 500.0M)) apply to the ...
0
votes
0
answers
29
views
Is it possible to read page table in Linux with unprivileged mode?
this is my very first question in Unix & Linux, I'm currently learning about virtual memory.
I am appreciating this awesome paper drammer (CCS'16). Where it fools the buddy allocator to allocate a ...
2
votes
0
answers
302
views
Process memory layout - difference between heap, data and mmap areas
I see in the web many conflicting or unclear descriptions of the memory layout of a Linux process. Usually the common diagram looks like:
And a common description would say that:
The data segment ...
0
votes
0
answers
71
views
Resident memory size RES automatically decreased after 10-day aging
My application consists of multiple processes.
Each of the processes has multiple threads.
Heap memory areas are allocated and freed dynamically during the operation.
I had a memory leaking bug in the ...
4
votes
1
answer
4k
views
Is there a way to set a hard cap/limit on how much RAM Chrome can use?
I'm using Linux on my Steam Deck (SteamOS/Arch Linux).
Is there a method to set a hard cap/limit on the maximum total RAM Chrome can use with command line arguments? (to 8 GB out of the device's max ...
0
votes
1
answer
66
views
Memory total shown on Linux on 8GB memory PC is only 7038920 kB
Why linux /proc/meminfo show:" 1 MemTotal: 7038920 kB " (proc most likely is to mean Kibibyte) in a PC of 8 GB memory RAM, although its Kibibyte is 7812500 ?
0
votes
1
answer
80
views
Do page tables used to store kernel stack pointer when context switch happen in kernel mode of the process?
I have two questions;
Suppose a user space application/process is running in kernel mode. I understand if a context switch is happened now, the kernel stack pointer of that process is stored in the ...
4
votes
1
answer
2k
views
How does mmio get routed to io devices?
I am trying to understand how IO devices are mapped into the 'regular' memory address space on modern x86 machines running Linux.
Some details which I am trying to make sense of are:
cat /proc/iomem ...
1
vote
1
answer
228
views
On some UNIX implementations, it is not possible to call free() on a block of memory allocated via memalign()
I use Linux only but I want to understand what this means:
From the Linux Programming Interface:
Blocks of memory allocated using memalign() or posix_memalign()
should be deallocated with free().
On ...
3
votes
1
answer
1k
views
Can a Linux Swap Partition Be Too Big?
Can a Linux swap partition be too big?
I'm pretty certain the answer is, "no" but I haven't found any resources on-point, so thought I'd ask.
In contrast, the main Windows swap file, ...
0
votes
0
answers
199
views
How can i access the page table of a process from kernel using a custom syscall?
I am using Ubuntu 16.04, kernel: 4.17.4
I want to access the page table of a process. The idea is, inside a c code I will call a custom Syscall and the syscall will be able to access the page table of ...
0
votes
1
answer
157
views
Is vmalloc() allocate bytes of memory which is virtually contiguous maps to memory area from different physical pages?
vmalloc(size) allocates a memory of size long which is virtually contiguous but the physical mapping would not be contiguous. Does that mean the the virtually allocated size long memory actually lies ...
2
votes
0
answers
131
views
How can I keep file-backed executable pages evicted from RAM in Linux?
I tried using madvise(MADV_DONTNEED) and verified with /proc/pid/pagemap that pages are unmapped correctly. Although none of the functions in the page is accessed, some of the pages are mapped back ...
1
vote
1
answer
246
views
what does fix mean in VMA operation in virtual memory managment
I'm reading "Understanding the Linux Virtual Memory Manager" by Gorman.
In Chapter 4 about Process Address Space, when VMA operations are introduced, for example create, lock and unlock, the ...