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
Jul 27, 2026 · Fundamentals

Master C++ Inc/Dec, Move, Copy, Reset, Destroy to Avoid Interview Pitfalls

This article systematically explains C++ reference‑count changes, the precise moments when ++/-- operators trigger in shared_ptr, move, copy, reset and destroy operations, and illustrates common mistakes with concrete code examples, helping developers and interviewees avoid subtle bugs and logic errors.

C++copy constructorincrement operator
0 likes · 20 min read
Master C++ Inc/Dec, Move, Copy, Reset, Destroy to Avoid Interview Pitfalls
Deepin Linux
Deepin Linux
Jul 25, 2026 · Fundamentals

Why System Calls Can Kill Performance and How to Cut Them

The article explains how frequent Linux system calls cause costly context switches, kernel checks, and cache/TLB invalidations, presents benchmark code that quantifies the overhead of getpid, open, read, and demonstrates batch I/O, caching, and algorithmic techniques to dramatically reduce those calls and boost high‑performance C++ network services.

CachingI/O batchingLinux
0 likes · 28 min read
Why System Calls Can Kill Performance and How to Cut Them
Deepin Linux
Deepin Linux
Jul 23, 2026 · Backend Development

Eliminate Select’s High CPU Usage: A Step‑by‑Step Epoll Source Dive in Pure C

The article walks developers through the root causes of high CPU consumption when using select/poll, explains why epoll solves these bottlenecks, and provides a complete, pure‑C implementation that covers socket setup, epoll creation, registration, event loops, level‑trigger vs edge‑trigger modes, and performance comparisons.

C programmingI/O multiplexingLinux
0 likes · 31 min read
Eliminate Select’s High CPU Usage: A Step‑by‑Step Epoll Source Dive in Pure C
Deepin Linux
Deepin Linux
Jul 22, 2026 · Fundamentals

Illustrated Guide to TCP/IP: Visualizing the Internet Protocol Suite

This article provides a step‑by‑step visual and textual walkthrough of the TCP/IP protocol family, covering its layered architecture, mapping to the OSI model, the evolution from hubs to switches, MAC and IP addressing, routing, TCP segment fields, the three‑way handshake and four‑way teardown, plus common interview questions and code examples.

HandshakeIPOSI Model
0 likes · 24 min read
Illustrated Guide to TCP/IP: Visualizing the Internet Protocol Suite
Deepin Linux
Deepin Linux
Jul 18, 2026 · Fundamentals

Mastering C++ Virtual Tables: Demystify Polymorphism and Avoid Pitfalls

This article explains how C++ implements polymorphism through virtual tables and vptrs, walks through single‑ and multiple‑inheritance examples, compares compile‑time and runtime polymorphism, and shows practical scenarios and guidelines for when to use or avoid polymorphic designs.

C++inheritancepolymorphism
0 likes · 26 min read
Mastering C++ Virtual Tables: Demystify Polymorphism and Avoid Pitfalls
Deepin Linux
Deepin Linux
Jul 16, 2026 · Fundamentals

Why STL Containers Crash in Linux Shared Memory: Underlying Causes Explained

The article analyzes why placing STL containers such as std::map, std::string, or std::vector directly in Linux shared memory leads to segmentation faults, detailing memory continuity, cross‑process pointer invalidation, and lifecycle issues, and then presents safe alternatives like fixed‑size arrays, manual memory management, and Boost.Interprocess.

C++IPCLinux
0 likes · 17 min read
Why STL Containers Crash in Linux Shared Memory: Underlying Causes Explained
Deepin Linux
Deepin Linux
Jul 14, 2026 · Backend Development

How to Diagnose C++ Memory Leaks and Segmentation Faults for High‑Frequency Interviews

The article explains why memory leaks and segmentation faults are hard‑to‑detect hidden bugs in Linux C++ back‑end and embedded development, illustrates common causes with concrete code samples, and walks through Linux commands and tools such as top, ps, pmap, vmstat, Valgrind, AddressSanitizer, memleak and gdb to locate and fix these issues.

GDBaddresssanitizerdebugging
0 likes · 25 min read
How to Diagnose C++ Memory Leaks and Segmentation Faults for High‑Frequency Interviews
Deepin Linux
Deepin Linux
Jul 13, 2026 · Fundamentals

What Hidden Costs Does C++ new Add to Heap Allocation?

The article reveals that using C++ new or malloc is far from cost‑free, detailing how Linux virtual address space, system‑call overhead, memory‑header metadata, fragmentation, and page‑fault latency all contribute to hidden performance penalties, and it offers concrete techniques such as stack allocation, memory pools, restrained PImpl usage, and startup pre‑allocation to mitigate these costs.

C++Linuxheap
0 likes · 23 min read
What Hidden Costs Does C++ new Add to Heap Allocation?
Deepin Linux
Deepin Linux
Jul 11, 2026 · Backend Development

Kernel Perspective: Accelerating C++ File Transfer via System Call Optimizations

The article explains why conventional read/write loops cause excessive user‑kernel switches and data copies that inflate CPU usage and limit throughput for large or high‑frequency file transfers, and it presents zero‑copy and asynchronous I/O techniques with complete C++ examples to eliminate these bottlenecks.

Async I/OC++File I/O
0 likes · 20 min read
Kernel Perspective: Accelerating C++ File Transfer via System Call Optimizations
Deepin Linux
Deepin Linux
Jun 27, 2026 · Fundamentals

Five Fatal Flaws of std::allocator and How PMR Fixes Them All

The article explains that the default C++ std::allocator suffers from five critical defects—strong type binding, compile‑time strategy lock‑in, lack of memory pools, uncontrolled lifecycles, and redundant nested‑container allocation—leading to performance loss, fragmentation and leaks, and shows how C++17 polymorphic memory resources (PMR) redesign eliminates each flaw with a layered, runtime‑switchable architecture and three built‑in pool strategies.

C++17Memory ManagementPMR
0 likes · 18 min read
Five Fatal Flaws of std::allocator and How PMR Fixes Them All