Tag

MMAP

0 views collected around this technical thread.

IT Services Circle
IT Services Circle
Jun 8, 2025 · Information Security

Why mmap Shared Memory Is More Dangerous Than malloc – Risks Explained

mmap shared memory lets multiple processes access the same physical memory, which can break process isolation, expose permission misconfigurations like PROT_EXEC, and cause cross‑process crashes or code‑injection attacks, making it far riskier than heap allocations with malloc that remain confined to a single process.

C ProgrammingMMAPmalloc
0 likes · 5 min read
Why mmap Shared Memory Is More Dangerous Than malloc – Risks Explained
Deepin Linux
Deepin Linux
Jun 6, 2025 · Fundamentals

Unlocking Linux Memory Management: From malloc to Buddy Allocation

This comprehensive guide explores Linux's memory management ecosystem, detailing user‑space allocators like malloc, kernel‑space mechanisms such as kmalloc, vmalloc, and mmap, and core kernel algorithms including the Buddy system, CMA, slab allocator, and memory pools, while providing code examples and practical usage tips.

Buddy AlgorithmLinuxMMAP
0 likes · 60 min read
Unlocking Linux Memory Management: From malloc to Buddy Allocation
IT Services Circle
IT Services Circle
May 13, 2025 · Fundamentals

Understanding mmap: How Memory Mapping Improves I/O Performance

This article explains how mmap maps files into a process's virtual memory to eliminate double data copies and reduce system‑call overhead, offering performance gains, a simpler programming model, and discusses its limitations such as address‑space constraints and page‑fault latency.

I/O performanceLinuxMMAP
0 likes · 8 min read
Understanding mmap: How Memory Mapping Improves I/O Performance
Deepin Linux
Deepin Linux
Feb 27, 2025 · Fundamentals

Understanding malloc and free: Memory Allocation Mechanisms in C

This article explains how the C functions malloc and free allocate and release memory, covering stack vs heap, the brk and mmap system calls, fragmentation, header metadata, and why both allocation strategies are needed for efficient memory management.

C ProgrammingMMAPbrk
0 likes · 17 min read
Understanding malloc and free: Memory Allocation Mechanisms in C
Lobster Programming
Lobster Programming
Feb 13, 2025 · Backend Development

Zero‑Copy Explained: From write+read to mmap, sendfile and splice

This article breaks down zero‑copy data transfer techniques—write+read, mmap+write, sendfile, sendfile + SG‑DMA, and splice—showing how they reduce CPU copies and context switches to boost I/O performance in modern operating systems.

MMAPZero Copybackend
0 likes · 9 min read
Zero‑Copy Explained: From write+read to mmap, sendfile and splice
Deepin Linux
Deepin Linux
Jan 23, 2025 · Backend Development

Zero‑Copy Techniques in Linux: sendfile, mmap, splice and tee

This article explains the concept of zero‑copy in Linux, compares the four main system calls—sendfile, mmap, splice and tee—describes their APIs, internal mechanisms, performance characteristics, typical use‑cases and provides practical code examples for high‑performance network programming.

LinuxMMAPZero Copy
0 likes · 37 min read
Zero‑Copy Techniques in Linux: sendfile, mmap, splice and tee
Deepin Linux
Deepin Linux
Dec 17, 2024 · Fundamentals

Efficient Memory Sharing with mmap and Zero‑Copy Techniques

This article explains how mmap and zero‑copy mechanisms, combined with DMA and shared‑memory APIs, can dramatically reduce CPU involvement, context switches, and data copies during file and network I/O, thereby improving system performance for high‑throughput applications.

DMAMMAPZero Copy
0 likes · 33 min read
Efficient Memory Sharing with mmap and Zero‑Copy Techniques
Deepin Linux
Deepin Linux
Dec 12, 2024 · Backend Development

Understanding Zero‑Copy Architecture: Concepts, Techniques, and Applications

Zero‑copy eliminates CPU‑mediated data copies between user and kernel spaces by using DMA and memory‑mapping, dramatically improving I/O performance, reducing context switches, and enabling high‑throughput applications such as file servers, Kafka brokers, and Java networking frameworks.

DMAI/O optimizationJava
0 likes · 28 min read
Understanding Zero‑Copy Architecture: Concepts, Techniques, and Applications
macrozheng
macrozheng
Oct 10, 2024 · Fundamentals

How Zero‑Copy Boosts Data Transfer: IO Mechanisms, mmap, sendfile & splice Explained

This article explains the concept of zero‑copy, compares traditional I/O copying with mmap, sendfile, DMA scatter/gather and splice techniques, and shows how Java NIO leverages mmap and sendfile to achieve high‑performance data transfer while minimizing CPU involvement.

IOJava NIOLinux
0 likes · 15 min read
How Zero‑Copy Boosts Data Transfer: IO Mechanisms, mmap, sendfile & splice Explained
IT Services Circle
IT Services Circle
Aug 5, 2024 · Backend Development

Why RocketMQ Lags Behind Kafka in Performance: The Impact of Zero‑Copy Techniques

The article explains how RocketMQ’s reliance on mmap‑based zero‑copy leads to more data copies and system‑call overhead compared to Kafka’s sendfile approach, resulting in lower throughput, and discusses when to choose each message‑queue system based on functional needs and performance requirements.

KafkaMMAPMessage Queue
0 likes · 8 min read
Why RocketMQ Lags Behind Kafka in Performance: The Impact of Zero‑Copy Techniques
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 5, 2024 · Databases

Evaluating the Use of mmap in Prometheus TSDB: Advantages, Disadvantages, and Performance Implications

This article examines mmap's historical origins, its performance benefits and drawbacks, and analyzes how Prometheus' time‑series database employs memory‑mapped files, revealing why mmap does not degrade Prometheus performance despite known kernel‑level issues such as TLB misses and lock contention.

DatabaseLinuxMMAP
0 likes · 26 min read
Evaluating the Use of mmap in Prometheus TSDB: Advantages, Disadvantages, and Performance Implications
Deepin Linux
Deepin Linux
Mar 7, 2024 · Fundamentals

Understanding Linux mmap: Memory Mapping, Shared Memory, and IPC Mechanisms

This article explains Linux's mmap mechanism, its relationship with shared memory, the advantages and disadvantages of mmap versus traditional shared memory, and provides practical code examples and detailed steps for using mmap in interprocess communication and large‑file handling.

IPCLinuxMMAP
0 likes · 19 min read
Understanding Linux mmap: Memory Mapping, Shared Memory, and IPC Mechanisms
Sohu Tech Products
Sohu Tech Products
Feb 28, 2024 · Big Data

Why Use Zarr? Storing and Accessing Large NumPy Arrays with mmap and Zarr

Zarr provides a modern, chunked and compressed storage format that lets you treat massive NumPy arrays like in‑memory objects, offering on‑demand loading, flexible back‑ends (disk, S3, zip), automatic caching, resizing, parallel reads/writes, and superior performance compared to traditional mmap‑based memmap files.

MMAPNumPyPython
0 likes · 18 min read
Why Use Zarr? Storing and Accessing Large NumPy Arrays with mmap and Zarr
Deepin Linux
Deepin Linux
Nov 27, 2023 · Fundamentals

Understanding Linux Memory Mapping (mmap): Concepts, APIs, and Source‑Code Analysis

This article explains the fundamentals of memory‑mapped files in Linux, covering the mmap/munmap interfaces, mapping types, protection flags, error handling, virtual‑memory structures, kernel implementation details, driver examples, and practical use‑cases such as shared memory and high‑performance I/O.

LinuxMMAPVirtual Memory
0 likes · 34 min read
Understanding Linux Memory Mapping (mmap): Concepts, APIs, and Source‑Code Analysis
Deepin Linux
Deepin Linux
Nov 20, 2023 · Fundamentals

Linux Memory Allocation Mechanisms: malloc, kmalloc, vmalloc, mmap, and Slab

This article explains Linux's flexible memory allocation system, covering user‑space malloc, kernel‑space kmalloc, vmalloc for large buffers, mmap for file and anonymous mappings, page allocation functions, the slab allocator, and memory pools, with detailed code examples and operational insights.

LinuxMMAPMemory Management
0 likes · 30 min read
Linux Memory Allocation Mechanisms: malloc, kmalloc, vmalloc, mmap, and Slab
Deepin Linux
Deepin Linux
Nov 9, 2023 · Fundamentals

Understanding Linux Memory Mapping (mmap): API, Implementation, and Use Cases

This article explains Linux memory mapping (mmap), covering its purpose, API parameters, different mapping types, internal kernel implementation, page‑fault handling, copy‑on‑write semantics, practical use cases, and includes a complete Objective‑C example demonstrating file mapping and manipulation.

Linux KernelMMAPVMA
0 likes · 27 min read
Understanding Linux Memory Mapping (mmap): API, Implementation, and Use Cases
Top Architect
Top Architect
Nov 16, 2022 · Backend Development

Understanding Zero‑Copy in Java: Concepts, Mechanisms, and Implementations

This article explains the zero‑copy technique in Java, covering I/O fundamentals, kernel read/write flow, mmap+write and Sendfile methods, virtual memory mapping, MappedByteBuffer and DirectByteBuffer usage, channel‑to‑channel transfer, Netty composite buffers, and how frameworks like RocketMQ and Kafka leverage zero‑copy for performance.

Java NIOMMAPNetty
0 likes · 13 min read
Understanding Zero‑Copy in Java: Concepts, Mechanisms, and Implementations
Xingsheng Youxuan Technology Community
Xingsheng Youxuan Technology Community
Oct 28, 2022 · Backend Development

How We Processed 1 Million Images in Sub-Second: Backend Optimization Secrets

Facing a challenge of managing roughly one million server-side images and 180 client images, the TOOSIMPLE team built a high-performance backend using fingerprinting, parallel processing, mmap-SSE2 acceleration, and sparsemap indexing, achieving sub-second response times while ensuring correct ordered display.

HashingMMAPbackend development
0 likes · 12 min read
How We Processed 1 Million Images in Sub-Second: Backend Optimization Secrets