Deepin Linux
Deepin Linux
Dec 25, 2025 · Operations

How to Optimize Linux Thread Stack Memory for High‑Concurrency Services

This article explains the fundamentals of Linux thread stack memory, identifies why default stack sizes can cause waste or overflow in high‑concurrency scenarios, and provides practical techniques—including stack‑size tuning, code refactoring, and memory‑mapping—to reduce memory usage and improve service stability.

CLinuxPOSIX
0 likes · 34 min read
How to Optimize Linux Thread Stack Memory for High‑Concurrency Services
Deepin Linux
Deepin Linux
Sep 25, 2025 · Fundamentals

Master Linux Thread Stacks: Prevent Overflows, Leaks, and Optimize Memory

This article explains the inner workings of Linux thread stacks, distinguishes user and kernel stacks, shows how NPTL creates independent stacks, highlights common pitfalls like stack overflow, memory leaks, and address‑space exhaustion, and provides practical C/C++ examples, tuning tips, thread‑pool designs, and debugging tools to keep your multithreaded programs stable and efficient.

LinuxStack OverflowThread Stack
0 likes · 46 min read
Master Linux Thread Stacks: Prevent Overflows, Leaks, and Optimize Memory
Liangxu Linux
Liangxu Linux
Oct 30, 2023 · Fundamentals

How Much Virtual Memory Does a Linux Thread Actually Consume?

This article reviews Linux virtual memory layouts for 32‑bit and 64‑bit systems, explains the different memory segments, shows how the default 8 MiB thread stack impacts virtual address consumption, and calculates practical thread limits based on virtual memory and kernel parameters.

32-bit64-bitThread Stack
0 likes · 8 min read
How Much Virtual Memory Does a Linux Thread Actually Consume?