Top "Mmap" questions

mmap is a POSIX-compliant Unix system call that maps files or devices into memory.

Why file starting offset in mmap() must be multiple of the page size

In mmap() manpage: Its prototype is: void *mmap(void *start, size_t length, int prot, int flags, int fd, off_…

offset mmap page-size
Speeding up file I/O: mmap() vs. read()

I have a Linux application that reads 150-200 files (4-10GB) in parallel. Each file is read in turn in …

c++ c file-io mmap
What is the difference between writing to a file and a mapped memory?

I have the following questions related to handling files and mapping them (mmap): We know that if we create a …

c linux file mmap
When would you use mmap

So, I understand that if you need some dynamically allocated memory, you can use malloc(). For example, your program reads …

c mmap
Overlapping pages with mmap (MAP_FIXED)

Due to some obscure reasons which are not relevant for this question, I need to resort to use MAP_FIXED …

c linux mmap libc
Linux device driver to allow an FPGA to DMA directly to CPU RAM

I'm writing a linux device driver to allow an FPGA (currently connected to the PC via PCI express) to DMA …

linux driver mmap dma pci-e
mmap problem, allocates huge amounts of memory

I got some huge files I need to parse, and people have been recommending mmap because this should avoid having …

c++ c memory mmap
mmap with /dev/zero

Say I allocate a big memory (40MB) with mmap using /dev/zero as follows. fd = open("/dev/zero", O_RDWR); …

c linux memory-management gcc mmap
How to portably extend a file accessed using mmap()

We're experimenting with changing SQLite, an embedded database system, to use mmap() instead of the usual read() and write() calls …

linux macos mmap
numpy vs. multiprocessing and mmap

I am using Python's multiprocessing module to process large numpy arrays in parallel. The arrays are memory-mapped using numpy.load(…

python numpy multiprocessing mmap