The tag has no usage guidance.

learn more… | top users | synonyms (1)

0
votes
0answers
36 views

How to convert from virtual address to physical address and back? [migrated]

I'm given a task to write an application that will talk to a device. However this is not a driver since device is still being developed and the application is intended to exercises its first revision. ...
4
votes
3answers
2k views

Discrepancy between reported used memory and sum of application memory usage

I'm running a desktop system that quite regularly suffers from lack of memory, this prompted me to investigate what causes the issue in the first place. Problem is, there's no single process that ...
1
vote
0answers
1k views

About mem and vmem

I am working with a cluster machine running under linux. I have a shell script that uses mpirun to submit my jobs to the cluster machine. In that same script, I can choose the number of nodes that ...
8
votes
2answers
2k views

An oom killer thats baffling me

I am not able to understand why would kernel issue this oom killer when I see enough memory is available: Also why are there so many kernel cache pages allocated? I say enough memory is available ...
3
votes
4answers
3k views

How much RAM needed for preventing use swap?

At my system always available some "Free" and "Inactive" memory, but sometimes system move couple megabytes to swap. Per night it maybe around 100MB, but for a few days in swap could be more than ...
0
votes
1answer
23 views

Questions about minor page fault

From Stephen's reply and comment at http://unix.stackexchange.com/a/289446/674 in some cases, data which has been marked for paging out but hasn't yet been paged out. paging out would ...
0
votes
2answers
37 views

What does it mean that a page fault may or may not involve auxillary storage access in making that page available

From manpage of top nMaj -- Major Page Fault Count The number of major page faults that have occurred for a task. A page fault occurs when a process attempts to read from or ...
2
votes
1answer
14 views

Do RES and USED of a process include the cache and buffer of the process?

In the output of top, I heard that RES of a process is the part of RAM occupied by the process, and includes the process' code, data, and shared libraries which are in RAM. I wonder if RES of a ...
0
votes
1answer
33 views

Does top read some system files?

If I am correct, the output of free comes from reading /proc/meminfo. In the output of top, is the summary of memory part not specific to a process also coming from /proc/meminfo? which system ...
0
votes
1answer
18 views

How to show USED in the output of top?

top doesn't show USED (a part of virtual memory) by default. How can I make it visible? Thanks.
0
votes
0answers
14 views

Understanding shared objects in virtual memory, in the output of top

In the output of top, does SHR for a process consist of only the following parts all the shared objects in RAM, e.g. shared libraries and shared data in RAM, shared between the process and any ...
4
votes
2answers
156 views

Differences and relations between VIRT and USED in output of top?

From manpage of top VIRT -- Virtual Memory Size (KiB) The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that ...
2
votes
0answers
38 views

Read another processes memory using ptrace() in C/CPP [RaspberryPi]

So, initially, process A created a file containing data (37 Bytes) read from a stream(UART). Process B has to acquire that data, which is stored in /dev/shm. Process A has an absolute maximum of 4ms ...
0
votes
0answers
20 views

Strange PFN read from pagemap

I m trying to find the physical page to which a range of virtual addresses are mapped in a piece of C code that I ve written. I m using the /proc/self/pagemap to read the mapping. I ve used the code ...
1
vote
0answers
61 views

How fast is a process reading/writing virtual memory?

We have top, htop, iotop, iostat, vmstat, etc, to measure many different things on Linux, but how can one measure how much MB/s a process is reading and writing to/from RAM, i.e., virtual memory?
1
vote
0answers
39 views

Pagemap on memory mapped devices not working

I am trying to find the physical addresses of heap variables, stack variables and memory mapped peripheral addresses using the /proc/{pid}/pagemap file using the steps detailed in the file: http://lxr....
1
vote
0answers
61 views

Linux kernel running only with use of physical address

Is it theoretically possible to make Linux which for its own kernel (include modules) uses only physical addresses? (it means it completely omits MMU) For processes how would you know if there was ...
0
votes
0answers
10 views

How to mmap file w/ HUGE_PAGES to specific memory location (via “memmap=4G$4G”)

Presently working: Device driver to mmap to specific memory location (isolated by boot parameter "memmap=4G$4G") via the remap_pfn_range call. Desired solution: Same/similar outcome using 2M pages ...
3
votes
1answer
31 views

How does Linux manage “simultaneous” writes to swap/disk partitions in virtual memory?

I'm currently working on an educational operating system called Pintos. While implementing virtual memory, one of the issues that I'm having is writing data to swap in a page fault that happened while ...
1
vote
0answers
15 views

What is the on-demand mapping in the kernel virtual memory in Linux? [duplicate]

In the OS lecture, the lecturer explained that not all the physical memory will fit into virtual address space on a 32-bit architecture. So what the kernel can do is map anything else above 896MB ...
0
votes
0answers
28 views

Why does .text region of shared libraries is not flagged as VM_SHARED?

When I'm using shmem/mmap to share memory between processes I can see with pmap that it creates virtual memory area that marked as shared. Example: Address Kbytes RSS Dirty Mode ...
8
votes
3answers
5k views

How does stack allocation work in Linux?

Does the OS reserve the fixed amount of valid virtual space for stack or something else? Am I able to produce a stack overflow just by using big local variables? I've wrote a small C program to test ...
7
votes
1answer
2k views

How do I increase the maximum swap space on Mac OS X? [closed]

On Mac OS X Yosemite 10.10.5, when I try to run a calculation that needs to allocate and use 128 GB of memory (it is a command line program written in C), the kernel kills my process with extreme ...
1
vote
1answer
40 views

vmstat -s command fields meaning, specially “pages paged in” vs “pages swapped in”

Most of the fields are understandable but can someone please explain me the difference between "pages paged in" and "pages swapped in"?. I'm pretty sure that swapping is when the entire process is ...
1
vote
0answers
66 views

Does Linux maintain a system RAM high water mark?

I know there is VmHWM entry in each process's /proc/[PID]/status file, however is there an aggregate of this that contains the high water mark for the system? I understand the free command give the ...
3
votes
2answers
102 views

C++ app. with mmap kills kernel? (kernel panic with mmap)

In my C++ program where intensive disk, network I/O and even CPU computation occur, I am using memory mapped region as an array. With very small data, it works fine. However when I ran the program ...
1
vote
0answers
51 views

Transparent Huge Pages, Pagetable size and /proc/<pid>/status

TL;DR; My pagetable is far bigger than it should be when using transparent huge pages (THP). I have a program (see below), that allocates 50 GiB of memory, requests transparent huge pages and faults ...
1
vote
1answer
59 views

Why deleting big files from tmpfs is not instantaneous?

$ cat /proc/mounts | egrep ' /tmp ' tmpfs /tmp tmpfs rw,nosuid,nodev,relatime 0 0 $ dd if=/dev/zero bs=1M count=3000 of=/tmp/q 3000+0 records in 3000+0 records out 3145728000 bytes (3.1 GB) copied, 1....
1
vote
0answers
15 views

FORTRAN executables: heap maxed out

I am trying to run a FORTRAN program on stampede (xsede machine). The error message I am getting is 'heap maxed out'. I think it has something to do with virtual memory allocation. So I use the ...
0
votes
1answer
66 views

Downsides of processes with high virtual size but low RAM and GPU memory use

I have noticed that some of my processes take a lot of virtual size in my computer. I understand that the virtual size of a process is the sum of memory it is actually using, memory it has mapped into ...
3
votes
1answer
149 views

FDT relocated by U-Boot cannot be accessed by Linux (in highmem)

We run a customized version of U-Boot on an ARM-based embedded system and would like to load Linux 4.3 with a device tree blob. The system features 1GB of RAM of which the top 128MB are reserved for ...
-1
votes
1answer
53 views

What is page fault and when does it occur? [closed]

In an interview I was asked this question: what is a page fault and when does it happen?
0
votes
2answers
31 views

prevent from writing to a large continuous section of virtual memory [closed]

How can an operating system kernel efficiently prevent a user process from writing to a large continuous section of virtual memory?
2
votes
1answer
2k views

Iotop shows swapin but vmstat si is zero

I run iotop and vmstat on a CentOS server. Under some load the iotop swapin column starts to display values around 5% to 20% for some processes. But vmstat si field remains at zero. I thought that ...
1
vote
0answers
16 views

How does an OS detect an access to random memory address of a compiled program? [duplicate]

I've read a couple things about memory management/virtual memory and I need a little more details on one important point. If I compile a program and it does an access to a hard-coded address without ...
3
votes
1answer
522 views

Accessing Memory Mapped I/O is slow

I have a Terasic-SoCKIT(fpga & arm cortex a9) and I have Linux running on the HPS. I'm trying to access the memory mapped I/O, wrote a simple character driver with functions "request_mem_region" ...
0
votes
0answers
39 views

How do I find corresponding kernel virtual addresses and userspace virtual addresses for a coreboot table driver?

How does kernel virtual addresses relate to userspace virtual addresses and is there a way to map the two with a kernel function? Some background: Coreboot puts some information in a table structure ...
2
votes
0answers
56 views

What does it mean when a private VM page is none of `rwx`?

UPDATE: It's a padding: every such non-rwx area is preceded with a readable and/or writable area and together they constitute a 64Mb segment (for 64bit architecture). A relevant question on SO: http:...
0
votes
0answers
88 views

Where can I find the MMU,CR3 and TLB for creating virtual addresses?

I want to understand virtual addressing and read many times the terms: MMU TLB (Translation Lookaside Buffer) and CR3 But currently I'm a bit confused. My confusion is: MMUThe MMU is hardware. ...
2
votes
2answers
142 views

Shared library load mem address region is architecture dependent?

I see that on x86, in a process's VM, shared libraries are loaded between heap and stack, i.e. the mmap area as noted in most of the online articles. But on a PowerPC linux box, I see that all ...
3
votes
3answers
2k views

Linux / JVM - OutOfMemoryError: unable to create new native thread

I have a memory problem with a Linux server (CentOS). It is a VM. Below is the context. It has 70Gb of RAM. There are 2 tomcat running on it. One tomcat is given a heap of 13Gb and the other one a ...
2
votes
0answers
61 views

When waiting on a pagefault, in what kind of sleep is a task?

Are tasks put into interruptible/uninterruptible/killable sleep when waiting on a pagefault? Does it matter, what kind of pagefault is it?
1
vote
2answers
203 views

On page fault, how does Unix determine if the faulting address is in swap space?

When a page fault occurs for a virtual address for any process how does the linux/unix operating system determine whether that page (of that virtual address) was swapped previously present in memory ...
4
votes
1answer
296 views

Shared library mappings in /proc/pid/maps

Why does /proc/pid/maps contain a few records for the same library ? Here is an example: 7fae7db9f000-7fae7dc8f000 r-xp 00000000 08:05 536861 /usr/lib/x86_64-linux-gnu/libstdc++....
2
votes
0answers
49 views

Print kernel memory layout

Userland memory layout can be inspected by looking into /proc/self/maps. I am wondering if there is a similar facility allowing to inspect runtime kernel memory layout?
3
votes
2answers
355 views

Physical Address Extension - how do virtual addresses work?

I'm running Debian Linux. uname -m says i686 which means 32-bit architecture machine with pae flag enabled. getconf LONG_BIT is 32. Installed RAM capacity is 6GB. My /proc/cpuinfo has an entry ...
3
votes
1answer
335 views

Kernel address space layout

Userland address space is well documented, which includes segments like heap, stack, .text, .bss, etc. But there is not enough documentation on kernel address space. Since certain virtual address is ...
1
vote
0answers
65 views

Why process is killed while a lot of memory is free?

I am running a python script in ipython. This script will take about 8GB RAM. The system has more than 80 GB free RAM but the swap is nearly 0. My script was killed after it runned for a while. I want ...
5
votes
0answers
140 views

How do I vmtouch a directory (not the files it contains)?

The vmtouch(8) tool allows locking a file or files in memory. It has recursive mode, but the directories are used just for discovering files and are not locked themselves. How do I lock a directory ...
1
vote
1answer
121 views

Why does my process take too long to die?

Basically I'm using Linux 2.6.34 on PowerPC (Freescale e500mc). I have a process (a kind of Virtual Machine that was developed in-house) that uses about 2.25 G of mlocked VM. When I kill it, I notice ...