Tagged articles
stack
77 articles · Page 1 of 1

liandkAug 29, 2026 · Fundamentals
This article introduces the stack data structure, explains its LIFO principle with everyday analogies like browser back and undo, compares it to arrays and linked lists, provides a complete Python implementation, demonstrates a simple undo simulation, and highlights common pitfalls for beginners.
AlgorithmLIFOPython
0 likes · 6 min read

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++Heapcode segment
0 likes · 13 min read

The article explains that a stack used for the valid‑parentheses interview question stores pending expectations rather than raw characters, why this LIFO structure is essential over a simple counter, and highlights common pitfalls and deeper follow‑up questions.
AlgorithmInterviewLIFO
0 likes · 9 min read

This article explains how Linux thread stacks work, why improper stack size or unchecked recursion can cause crashes and memory leaks, and provides practical debugging tools, stack‑size tuning methods, and optimization techniques—including thread‑pool usage and real‑world case studies—to keep concurrent programs stable and efficient.
Threaddebuggingstack
0 likes · 28 min read

This article explains how Linux processes and glibc threads allocate stacks, then details Go's runtime mechanisms for creating thread stacks and lightweight goroutine stacks, including guard‑based detection and automatic stack growth, with code examples and diagrams.
ConcurrencyGoMemory
0 likes · 16 min read

This tutorial shows how C arrays are stored in the stack, global segment, and heap on a 64‑bit Linux system, using gcc compilation, gdb inspection, and concrete memory addresses to illustrate the exact layout of each region.
C++Global SegmentHeap
0 likes · 7 min read

This article explains the fundamental differences between stack and heap memory allocation, covering their allocation mechanisms, performance characteristics, common pitfalls such as stack overflow and memory leaks, practical code examples in C/C++, and typical interview questions to help developers choose the right memory model for their applications.
C++HeapInterview
0 likes · 65 min read

This article clarifies whether a C++ vector object resides on the stack, heap, or in static storage, explains that its elements are almost always allocated on the heap, covers special cases like small‑vector optimization, and provides interview‑ready answers with sample code and memory‑location experiments.
C++HeapInterview
0 likes · 12 min read

The article reflects on why mid‑career engineers are often relegated to legacy‑maintenance work, argues that such roles can be leveraged for growth by modernizing systems and adopting AI, and then presents the classic Valid Parentheses coding challenge, explaining a stack‑based solution with implementations, complexity analysis, and common pitfalls.
AlgorithmC++Career
0 likes · 14 min read

This article explains the principles of queues and stacks, demonstrates how to simulate a FIFO queue using two LIFO stacks in PHP, provides full source code, usage examples, complexity analysis, and discusses practical applications and possible extensions.
AlgorithmComplexityPHP
0 likes · 5 min read

This article explains the fundamental differences between stack and heap memory, covering their structures, allocation strategies, performance characteristics, language-specific examples in Java, C++, and Python, and provides guidance on when to use each type for efficient programming.
C++HeapJava
0 likes · 16 min read

This article explains the Linux kernel’s memory management for a process, covering virtual address spaces, page‑fault handling, VMA allocation, stack and heap initialization, sbrk/brk usage, thread‑stack creation, and the glibc ptmalloc heap allocator with concrete code examples and diagrams.
HeapLinuxmalloc
0 likes · 15 min read

This guide outlines the core data structures—arrays, 2D arrays, queues, linked lists, stacks, trees, and hash maps—explaining their characteristics, typical use‑case scenarios, and concrete examples to help embedded developers write efficient, scalable code.
Queuearraysdata structures
0 likes · 6 min read

This article explains how to replace recursive functions in PHP with stack‑based iteration, loop‑driven depth‑first tree traversal, and even a goto‑based approach, providing complete code examples and discussing the trade‑offs of each method.
AlgorithmGotoiteration
0 likes · 7 min read

This article explains why mastering assembly language is crucial for understanding how computers execute code, covering the nature of low‑level languages, CPU instruction encoding, registers, memory models such as heap and stack, and walks through a complete x86 example with detailed instruction analysis.
CPUHeapLow-Level Programming
0 likes · 14 min read

This article introduces x86 assembly language, explaining its historical origins, the role of CPU registers such as EAX and ESP, the heap and downward‑growing stack memory models, and demonstrates basic stack‑frame operations like push, call, mov, add, pop, and ret through a simple compiled example.
CPULow-Level ProgrammingMemory
0 likes · 13 min read

An overview of the BSS, data, and text segments in program memory—explaining their roles for uninitialized, initialized global variables and executable code, plus heap and stack basics, illustrated with C examples that show how segment placement affects binary size.
Data SegmentHeapMemory Layout
0 likes · 7 min read

The article explains C’s memory allocation, detailing how functions like malloc obtain heap space, the role of system calls such as brk, the distinction between stack and heap, address layout, fragmentation challenges, and practical implications for efficient dynamic memory management.
Heapc-programmingmalloc
0 likes · 5 min read

This article systematically analyzes a function call in an embedded system from four perspectives—assembly code, registers, stack layout, and map files—illustrating how the compiler generates the call, what values each register holds, how the stack is allocated, and how to trace execution using disassembly and memory views.
Registersassemblydebugging
0 likes · 7 min read

This article introduces the LeetCode Hard‑level "Basic Calculator" problem, explains its interview background, provides a detailed problem statement with examples, outlines the key algorithmic concepts and solution approach using a stack, and includes a complete Java reference implementation.
AlgorithmExpression EvaluationLeetCode
0 likes · 9 min read

This article explains C language memory partitioning—including stack, heap, global/static, constant, and code sections—illustrates their characteristics and growth directions, then applies the concepts to STM32F103 by showing memory map details and providing a complete Keil‑based C program that prints the addresses of variables in each region.
C++Data SegmentEmbedded
0 likes · 10 min read

This article explains the C language memory segmentation—including stack, heap, global/static, constant, and code areas—illustrates their behavior on STM32F103 with Keil V5, and provides detailed example code that prints the addresses of variables in each region to demonstrate allocation and lifetime.
C++EmbeddedHeap
0 likes · 9 min read

This article explains six typical OutOfMemoryError situations in Java—heap, native thread, stack overflow, direct buffer, GC overhead, and Metaspace—provides code examples that trigger each issue, shows the resulting exception messages, and offers practical tips such as using thread pools, limiting recursion depth, adjusting GC settings, and configuring Metaspace to avoid these memory problems.
GCHeapJVM
0 likes · 9 min read


政采云技术Dec 28, 2023 · Fundamentals
This article explains the definitions, characteristics, and overflow cases of sequential and circular queues and stacks, provides Java implementations for these data structures, demonstrates their usage with sample code and results, and discusses practical applications of queue thinking in database-driven workflows.
AlgorithmJavaQueue
0 likes · 13 min read

The article explains Go’s stack and heap memory, showing that stack allocations are fast, LIFO‑ordered and compile‑time sized while heap allocations grow upward, require garbage collection, and occur when variables escape a function, urging developers to prefer stack use for better performance.
GoHeapgarbage collection
0 likes · 6 min read

This article explains how to decode nested strings formatted as k[encoded_string] by using a stack to record repetition counts and substrings, detailing the push/pop logic with examples like 2[a3[b]] and 3[a]2[bc] and providing a complete Go implementation.
AlgorithmGonested strings
0 likes · 5 min read

The article explains how to determine whether a given push sequence and pop sequence form a valid stack operation by using a temporary Go slice as a stack, iterating through the push list, and repeatedly popping while the top matches the next pop element, finally returning a boolean result.
AlgorithmGoInterview
0 likes · 3 min read

This article explains the five memory partitions in C, the storage regions created during compilation and linking, the different program segments (code, RO data, RW data, BSS, heap, stack), the proper use of const and pointers, 8051-specific memory qualifiers, and a detailed comparison of stack and heap allocation, including practical code examples.
Data SegmentsHeapc-programming
0 likes · 25 min read

This article provides a comprehensive guide to C memory organization, covering the five primary memory regions, the layout of compiled C programs, detailed segment types such as code, read‑only, read‑write, BSS, heap and stack, as well as const usage, pointer rules, and embedded‑system storage qualifiers.
Heapc-programmingconst
0 likes · 25 min read

The article investigates a real‑world Android navigation bug by dissecting how FLAG_ACTIVITY_NEW_TASK interacts with launch modes, task affinities and intent construction, revealing that the flag does not always behave like singleTask, that START_DELIVERED_TO_TOP may fail to deliver new intents, and offering debugging steps and practical fixes.
ActivityAndroidFLAG_ACTIVITY_NEW_TASK
0 likes · 23 min read

This article explains how C programs allocate, resize, initialize, and transfer memory using functions like malloc, free, realloc, memset, memcpy, memmove, and alloca, and provides coding standards to avoid out‑of‑bounds errors, leaks, and use‑after‑free bugs.
C++Memcpymalloc
0 likes · 11 min read

This article explains the JVM memory layout, covering the heap (including Xms/Xmx tuning, Young/Old generations, and garbage collection), Metaspace versus PermGen, the thread‑private JVM stack and native method stack, and the program counter register, with practical code examples.
HeapJVMgarbage collection
0 likes · 15 min read

This article explains the JVM memory layout, covering the heap (young and old generations), Metaspace, virtual machine stacks, native method stacks, and the program‑counter register, while describing their roles, configuration parameters and how they interact during garbage collection and method execution.
HeapJVMJava
0 likes · 14 min read

This article demystifies the JVM’s runtime data areas and illustrates, with a simple Java example and animation, how a program’s bytecode is executed—from the program counter and stack frames to heap allocation and garbage collection—providing a clear, step‑by‑step view of Java execution.
HeapJVMJava
0 likes · 5 min read

This article explains the JVM memory layout, covering the heap area, its configurable size and generational structure, the Metaspace replacement for PermGen, the thread‑private virtual machine stack and native method stack, as well as the program counter register and related garbage‑collection behavior.
HeapJVMJava
0 likes · 14 min read

The article walks through building a simple JavaScript HTML parser by explaining browser parsing basics, using regular expressions to detect tags, managing a stack to match opening and closing elements, creating element and text node objects, and outlining code snippets while noting omitted features like script and style handling.
DOMHTML parserJavaScript
0 likes · 9 min read

This article explains how the Java Virtual Machine achieves write‑once‑run‑anywhere by abstracting platform differences, then details the JVM’s internal components—including the class‑loader subsystem, runtime data areas such as heap, stack, method area, and program counter—followed by code examples and analysis of object layout, pointer compression, and memory allocation strategies.
HeapJVMJava
0 likes · 30 min read

This article explains the JVM memory architecture, covering the heap (young and old generations, Eden and Survivor spaces), Metaspace, virtual machine stacks, native method stacks, and the program counter register, while also illustrating key JVM parameters and bytecode execution with examples.
HeapJVMJava
0 likes · 13 min read

This article explains how to create a basic HTML parser in JavaScript by using regular expressions and a stack to convert an HTML string into a tree of nodes, complete with code examples, initialization steps, and handling of opening, closing, and self‑closing tags.
DOMHTML parserJavaScript
0 likes · 9 min read

This article explains how memory allocation on the stack is faster than on the heap, demonstrates the process with assembly instructions, provides benchmark code comparing allocation speeds, discusses compiler optimizations, and outlines the differences, advantages, and pitfalls of stack and heap memory usage.
C++Heapcompiler optimization
0 likes · 9 min read

This article introduces the fundamentals of data structures and algorithms, covering basic structures such as arrays and linked lists, common sorting algorithms, advanced structures like B+ trees and red‑black trees, explains Big O notation, and provides Java code examples for dynamic arrays, linked lists, queues, and stacks.
AlgorithmsBig OJava
0 likes · 15 min read

This article explains the concept of a stack as a LIFO data structure, its hardware implementation in CPUs, how it supports function calls and multitasking, and details the four types of stacks used in Linux—including process, thread, kernel, and interrupt stacks—along with code examples and diagrams.
Function CallLinuxMultitasking
0 likes · 20 min read

This article provides a comprehensive overview of the Java Virtual Machine memory architecture, covering heap layout, allocation, tuning parameters, garbage collection, stack frames, method area, metaspace, native method stack, program counter, direct memory, and code cache, with practical code examples and diagnostics.
HeapJVMJava
0 likes · 16 min read

This article provides a comprehensive overview of the Java Virtual Machine memory layout, covering the heap, metaspace, stack frames, program counter, direct memory, and code cache, along with practical tuning tips, demonstration code for heap OOM, and references for deeper study.
HeapJVMJava memory
0 likes · 19 min read

This article examines the various causes of Java OutOfMemoryError, demonstrating heap overflow, stack overflow, metaspace exhaustion, and direct memory exhaustion through practical code examples, and explains how to diagnose and differentiate memory leaks from genuine memory overuse using JVM tools.
DirectMemoryHeapJVM
0 likes · 14 min read


JavaEdgeJul 2, 2021 · Backend Development
This article explains the various types of Java OutOfMemoryError, shows how to trigger each one on HotSpot JVM, provides diagnostic steps and relevant JVM flags, and offers practical code examples for heap, stack, metaspace, and direct memory overflow scenarios.
DirectMemoryJVMJava
0 likes · 16 min read

This article provides a comprehensive overview of data structures and algorithms, covering fundamental concepts such as data, elements, objects, logical and storage structures, common structures like lists, stacks, queues, trees, graphs, algorithm design techniques, complexity analysis, and includes visual resources and code examples.
AlgorithmsComplexityGraph Algorithms
0 likes · 33 min read

This article explains the stack data structure, its LIFO characteristics, typical applications such as bracket matching, expression evaluation, next‑greater‑element problems, browser navigation, and JavaScript execution contexts, and provides clear JavaScript code examples for each scenario.
AlgorithmMonotonic Stackdata structures
0 likes · 12 min read

This comprehensive guide explains core data concepts, defines data, data objects, elements and types, explores logical and physical structures, details sequential, linked, indexed and hash storage, and provides Java code examples for arrays, linked lists, stacks, queues, trees, binary search trees, AVL and red‑black trees, illustrating how to choose and implement appropriate structures for real‑world problems.
AlgorithmsJavaQueue
0 likes · 24 min read

This article explains Java 8's memory architecture, detailing the differences between JVM-managed memory and native memory, and describing each runtime data area—including the program counter, JVM stack, native method stack, heap, method area, and direct memory—along with common questions about variable storage and native methods.
HeapJavaNative Memory
0 likes · 13 min read

This article explains the causes of various Java OutOfMemoryError scenarios—including heap, stack, metaspace, and direct memory overflow—provides diagnostic tools, shows reproducible code examples, and offers practical solutions such as adjusting JVM parameters and optimizing code to prevent memory exhaustion.
HeapJVMJava
0 likes · 17 min read

This article provides a concise overview of eight essential data structures—arrays, linked lists, stacks, queues, hash tables, trees, heaps, and graphs—explaining their definitions, core operations, and typical applications in software development and computer science.
AlgorithmsQueuearrays
0 likes · 12 min read

This article explains the difference between value passing and reference passing in Java, clarifies how primitive and object types are stored in stack and heap, and demonstrates the behavior with concrete code examples showing how modifications affect (or do not affect) the original arguments.
HeapJavaValue vs Reference
0 likes · 6 min read

This article investigates whether Java int primitives are cached during execution, detailing JVM stack allocation, the specific bytecode instructions (iconst, bipush, sipush, ldc) used for different int ranges, and how local variable tables and operand stacks interact, illustrated with code and bytecode examples.
Constant PoolJVMJava
0 likes · 7 min read

This article explains the meaning of "stack" in Java, examines the JDK's Stack class implementation—including its inheritance from Vector and core methods—provides full source code, demonstrates array manipulation with System.arraycopy, and explores common stack applications such as browser navigation, function call stacks, and complexity analysis.
JDKJavaarray
0 likes · 8 min read

This article provides a comprehensive overview of the Java Virtual Machine memory model, detailing each runtime data area—including the heap, stacks, method area, program counter, and direct memory—and explains their purposes and interactions within Java applications.
HeapJVMRuntime Data Area
0 likes · 4 min read

This article explains the differences between Java's heap and stack memory areas, their advantages and disadvantages, and demonstrates how string objects are allocated and shared with clear code examples that illustrate memory usage and performance implications.
HeapJavagarbage collection
0 likes · 4 min read

This article explains how Go's runtime initializes, allocates, expands, and shrinks goroutine stack memory, detailing the underlying heap structures, global pools, platform‑specific constants, and the code paths that handle stack growth and reclamation.
ConcurrencyGogoroutine
0 likes · 11 min read

This article introduces eight fundamental data structures—arrays, linked lists, stacks, queues, hash tables, trees, heaps, and graphs—explaining their definitions, core operations, typical applications, and visual illustrations to help programmers master essential concepts for software development and technical interviews.
Queuearraydata structures
0 likes · 12 min read


ITPUBMar 25, 2020 · Fundamentals
This article introduces eight fundamental data structures—arrays, linked lists, stacks, queues, hash tables, trees, heaps, and graphs—explaining their definitions, core operations, typical applications, and key characteristics to help developers build a solid foundation.
GraphQueuearray
0 likes · 13 min read

This article provides a comprehensive overview of the Java Virtual Machine memory layout, covering heap regions, Metaspace, stack frames, native method stack, program counter, direct memory, and code cache, along with configuration tips, diagnostic commands, and illustrative code examples to help readers understand memory allocation and garbage collection.
HeapJVMgarbage collection
0 likes · 16 min read

This guide explains the principles of stack (LIFO) and queue (FIFO) data structures, demonstrates how to implement them in Python using classes with methods for push, pop, enqueue, dequeue, and provides complete example code for both stack.py and queue implementations.
Code ExamplePythonQueue
0 likes · 5 min read

This comprehensive guide walks through the four‑layer backend stack, component selection for startups—including languages, databases, messaging, monitoring, and deployment tools—and offers practical advice on choosing cloud providers, defining processes, and designing a cloud‑centric architecture for fast‑moving companies.
Backendcloudcomponents
0 likes · 31 min read

This article provides a detailed comparison of Java's List interface implementations—ArrayList, LinkedList, Vector, and Stack—explaining their underlying data structures, key methods such as get, set, add, and remove, performance characteristics, thread safety, and appropriate usage scenarios.
JavaLinkedListList
0 likes · 18 min read

This article explores the maximum number of threads a Java Virtual Machine can support, examining factors such as CPU, operating system, JVM version, and memory, and presents real‑world experiments, code examples, and theoretical calculations to help developers understand and manage thread limits effectively.
JVMJavaMemory
0 likes · 6 min read

This article explains the core concepts of stacks, queues, and priority queues, discusses their time complexities, and provides complete Java implementations using arrays, including methods for insertion, removal, peeking, and display, along with a circular array queue example.
JavaQueuepriority queue
0 likes · 8 min read

This article explains the differences between Java heap and stack memory, their advantages and disadvantages, and demonstrates how string objects are stored and shared using code examples that illustrate memory allocation and reference behavior.
HeapJavaString
0 likes · 4 min read

This article explains the concepts of Call Stack and Stack, demonstrates their operation with JavaScript examples, discusses Node.js default stack size and depth limits, shows how to query and adjust stack size, and examines V8's compilation optimizations across multiple Node versions.
call stackstack
0 likes · 7 min read

This article explains the differences between stack and heap memory on Android devices, outlines typical memory problems such as high usage, leaks, and overflow, and demonstrates practical testing methods using the dumpsys meminfo command and the LeakCanary library with code examples.
AndroidHeapLeakCanary
0 likes · 5 min read

This article explains the stack data structure, its Python interface, and demonstrates practical algorithms such as bracket matching, maze solving, postfix expression evaluation, and the knapsack problem, providing clear code examples and visual illustrations for each concept.
Pythondata structuresexamples
0 likes · 11 min read

This article explains how LINE Manga uses a custom Page Stack architecture, inspired by iOS UINavigationController, to deliver native‑like, smooth page transitions in a web environment, addressing back‑button latency, scroll restoration, and lazy‑load image issues with practical React/React‑Router examples.
JavaScriptWeb Performancefrontend
0 likes · 5 min read

This article explains the structure and operation of the JVM stack, including stack frames, local variable tables, operand stacks, slots, and common bytecode instructions, providing code examples and visual aids to help readers grasp how Java bytecode is executed on the stack.
Java__slots__operand-stack
0 likes · 13 min read

This article demystifies JavaScript memory by explaining stack and heap concepts, variable objects, primitive and reference types, and the mark‑and‑sweep garbage‑collection algorithm, helping front‑end developers write more efficient code.
HeapJavaScriptfrontend
0 likes · 9 min read

This article explains the concept of a stack as a LIFO data structure, shows how to implement a Stack class in JavaScript with essential methods like push, pop, size, empty, peek, and clear, and demonstrates practical usage through recursive and iterative factorial calculations.
AlgorithmJavaScriptTutorial
0 likes · 4 min read

This article explains how a running program's code and variables are organized in Linux memory, covering virtual address mapping, the purpose of each segment (text, rodata, data, bss, stack, heap), and demonstrates the concepts with concrete C examples and memory‑map screenshots.
BSSHeapLinux
0 likes · 11 min read


DevOpsApr 7, 2016 · Fundamentals
Through a whimsical tale of a class named Account, the article explains Java class loading, the hierarchy of classloaders, bytecode execution, the method area, stack, heap, garbage collection, and debugging, providing an engaging overview of JVM fundamentals.
ClassLoaderJVMJava
0 likes · 13 min read


21CTOMar 23, 2016 · Fundamentals
This article explains the concept of heaps, especially min‑heaps, and demonstrates how PHP's SPL provides ready‑made implementations for stacks, queues, min‑heaps, and fixed‑size arrays with clear code examples.
HeapPHPQueue
0 likes · 3 min read
