Tagged articles
3 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Aug 30, 2025 · Fundamentals

Why Is Stack Memory Faster Than Heap? Uncover the Secrets of Memory Allocation

This article explains the fundamental differences between stack and heap memory allocation, covering their allocation mechanisms, performance characteristics, typical use cases such as stack overflow and memory leaks, and provides C and C++ code examples to illustrate each concept.

Heap MemoryRecursionStack Memory
0 likes · 60 min read
Why Is Stack Memory Faster Than Heap? Uncover the Secrets of Memory Allocation
Tencent Cloud Developer
Tencent Cloud Developer
Sep 14, 2022 · Backend Development

Understanding Go Stack Memory Management

The article explains how Go’s runtime manages goroutine stacks—starting with a 2 KB initial size, evolving from segmented to continuous stacks, detailing allocation via stackpool and stackLarge, expansion with runtime.newstack, shrinkage by the garbage collector, and the internal structures that coordinate these processes.

GoMemory ManagementRuntime
0 likes · 15 min read
Understanding Go Stack Memory Management
Full-Stack Trendsetter
Full-Stack Trendsetter
Jan 27, 2022 · Fundamentals

Understanding the Difference Between JavaScript Stack and Heap Memory

The article explains how JavaScript engines store variables in stack and heap memory, clarifies why const primitives are immutable while object properties can change, shows that new objects reside in heap, and discusses allocation efficiency and garbage‑collection behavior of both memory regions.

Garbage CollectionHeap MemoryJavaScript
0 likes · 5 min read
Understanding the Difference Between JavaScript Stack and Heap Memory