Skip to main content

Questions tagged [memory-management]

The tag has no usage guidance.

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 ...
Soumajit's user avatar
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 ...
Ackerman Shadow's user avatar
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 ...
Y.H.Qian's user avatar
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 ...
aviro's user avatar
  • 5,922
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 ...
Masaki Nishikawa's user avatar
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 ...
JLHack7's user avatar
  • 41
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 ?
user avatar
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 ...
Franc's user avatar
  • 299
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 ...
shafe's user avatar
  • 201
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 ...
Rick's user avatar
  • 1,197
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, ...
ebsf's user avatar
  • 331
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 ...
Misbah's user avatar
  • 1
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 ...
Franc's user avatar
  • 299
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 ...
pcp's user avatar
  • 21
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 ...
Zzzz's user avatar
  • 13

15 30 50 per page