Questions tagged [mmap]
All about using memory mapped files. Questions on programming should be asked on Stack Overflow SE.
85 questions
2 votes
2 answers
151 views
Update mmap mapping to be readonly without overwriting existing data
I'm making a custom ELF loader to learn how the dynamic loader works behind the scenes, and one of the program headers often found in them is PT_GNU_RELRO, which tells the loader to make that segment ...
1 vote
0 answers
305 views
How can I pre-fault and lock memory pages that are mmap'd with MAP_PRIVATE?
I am writing a real-time linux application where I need to prevent any page faults from occuring after the initial startup of my application. My initial thought was just to call mlockall(MCL_CURRENT | ...
6 votes
1 answer
2k views
Does mmap() update the page table after every page fault?
Based on my research on mmap(), I understand that mmap uses demand paging to copy in data to the kernel page cache only when the virtual memory address is touched, through page fault. If we are ...
3 votes
1 answer
125 views
How is 4kB RSS possible in Linux 4.x?
I have been the dev/maintainer of an open source IRC bot since the late 90s. The goal was always to make it as versatile & useful as possible in a small memory footprint. During the 2000s I also ...
0 votes
0 answers
311 views
How to read watchdog registers on x86 Linux?
I want to read the Intel iTCO watchdog registers on my Intel Lynx Point system. I found the watchdog here: [ 5598.341020] iTCO_wdt iTCO_wdt.1.auto: Found a Lynx Point TCO device (Version=2, TCOBASE=...
0 votes
0 answers
98 views
Searching a 1T block device for a specific byte sequence at a specified offset
I'm performing data recovery after an accident with dd. In the longer term, I'll need to use some recovery tools to try and repair the file system In the meantime, there's an image on the system that ...
5 votes
1 answer
1k views
Linux HugeTLB: What is the advantage of the filesystem approach?
Moved Post Notice I just moved this question (with slight modifications) from a StackOverflow question (which I have deleted, since cross-posting is strongly discouraged), which has not been answered ...
1 vote
1 answer
309 views
Partial fsyncs when writing to block device
I'm writing my own data store directly on top of a block device. To ensure durability I want to sync to disk. But here's the thing: I want to sync only part of it. I'm keeping a journal for crash ...