Deepin Linux
Author

Deepin Linux

Research areas: Windows & Linux platforms, C/C++ backend development, embedded systems and Linux kernel, etc.

469
Articles
1
Likes
2.7k
Views
0
Comments
Recent Articles

Latest from Deepin Linux

100 recent articles max
Deepin Linux
Deepin Linux
Jun 26, 2026 · Fundamentals

Mastering C++ vtable internals: Demystifying polymorphism

This article explains how C++ implements polymorphism through virtual tables and virtual pointers, walks through their generation, memory layout, single‑ and multiple‑inheritance scenarios, distinguishes compile‑time and runtime polymorphism, and shows practical guidelines for when to use or avoid polymorphic designs.

C++compile-time polymorphisminheritance
0 likes · 28 min read
Mastering C++ vtable internals: Demystifying polymorphism
Deepin Linux
Deepin Linux
Jun 25, 2026 · Fundamentals

Understanding C/C++ Process Memory Layout: Code, Global, Stack, and Heap

This article explains how an operating system divides a C/C++ program's virtual address space into four distinct regions—code, global, stack, and heap—detailing their lifetimes, permissions, management rules, and common pitfalls such as memory leaks, dangling pointers, and stack overflow.

C++Memory Managementcode segment
0 likes · 13 min read
Understanding C/C++ Process Memory Layout: Code, Global, Stack, and Heap
Deepin Linux
Deepin Linux
Jun 24, 2026 · Fundamentals

Master Compile‑Time Polymorphism: Ditch Obscure SFINAE with C++20 Concepts

The article explains compile‑time polymorphism in C++, shows why traditional SFINAE is hard to read and debug, and demonstrates how C++20 Concepts provide clearer syntax, precise errors, and better multi‑condition support, backed by side‑by‑side code examples and a detailed feature comparison.

C++ConceptsMetaprogramming
0 likes · 12 min read
Master Compile‑Time Polymorphism: Ditch Obscure SFINAE with C++20 Concepts
Deepin Linux
Deepin Linux
Jun 23, 2026 · Fundamentals

How Type Traits Rescue a Broken C++ Object Pool and Enable Type‑Adaptive Pooling

The author recounts how a naïve generic C++ object pool caused data residue, construction failures, and incompatibility with primitive types, then demonstrates a refactored, thread‑safe pool that leverages compile‑time Type Traits, std::enable_if, and constexpr if to apply distinct creation, reset, and destruction logic for trivial, Clear‑able, and non‑trivial types, eliminating the earlier bugs.

C++Object PoolTemplate Metaprogramming
0 likes · 11 min read
How Type Traits Rescue a Broken C++ Object Pool and Enable Type‑Adaptive Pooling
Deepin Linux
Deepin Linux
Jun 22, 2026 · Backend Development

Memory Pool vs Object Pool: When to Choose and How to Build One from Scratch

The article explains why high‑concurrency programs suffer from memory fragmentation and system‑call overhead, compares memory pools and object pools, outlines their distinct use‑cases, provides step‑by‑step C and C++ implementations, and highlights optimization tips and common pitfalls.

C++Memory poolObject Pool
0 likes · 20 min read
Memory Pool vs Object Pool: When to Choose and How to Build One from Scratch
Deepin Linux
Deepin Linux
Jun 21, 2026 · Backend Development

Why Off‑Heap Memory Can Leak on Linux—and How to Avoid It

The article explains how off‑heap memory and mmap enable zero‑copy I/O for high‑performance Linux services, but because the JVM does not manage it, careless allocation or missing releases can cause off‑heap memory leaks that lead to OOM, and it provides concrete detection and mitigation techniques.

C++JavaLinux
0 likes · 24 min read
Why Off‑Heap Memory Can Leak on Linux—and How to Avoid It
Deepin Linux
Deepin Linux
Jun 20, 2026 · Fundamentals

Why Using Pipes Can Max Out Your CPU: Hidden Costs and Fixes

Although Linux pipes avoid disk I/O and seem faster, misuse such as tiny frequent writes, mismatched read/write speeds, non‑blocking tight loops, and improper fd handling can drive a single core to 100 % CPU, but the article explains the underlying reasons and step‑by‑step optimizations to prevent it.

CPU usageIPCLinux
0 likes · 17 min read
Why Using Pipes Can Max Out Your CPU: Hidden Costs and Fixes
Deepin Linux
Deepin Linux
Jun 19, 2026 · Fundamentals

Deep Dive into Linux Dynamic Linking: Building and Running .so Libraries

This article explains the fundamentals of Linux dynamic linking, compares .so shared objects with static libraries, walks through creating and compiling a simple math library, shows how to link and run an executable, and details runtime loading, library path configuration, and common troubleshooting techniques.

Dynamic LinkingLinuxShared Library
0 likes · 31 min read
Deep Dive into Linux Dynamic Linking: Building and Running .so Libraries
Deepin Linux
Deepin Linux
Jun 15, 2026 · Backend Development

Understanding Linux PCI Drivers: A Complete Beginner’s Guide

This article walks readers through the fundamentals of Linux PCI/PCIe buses, explains the kernel PCI subsystem, details core data structures such as struct pci_dev, struct pci_driver, and struct pci_device_id, and provides step‑by‑step code examples for device enumeration, driver matching, resource allocation, and practical driver implementation.

C++DeviceKernel
0 likes · 25 min read
Understanding Linux PCI Drivers: A Complete Beginner’s Guide