Tagged articles
Heap
88 articles · Page 1 of 1
The Go Collections working group’s umbrella proposal for Go 1.28 adds seven generic collection components—including hash‑based Set, ordered tree Map, and a revamped generic heap—addressing long‑standing gaps in the language’s standard library and outlining design trade‑offs and future extensions.
GenericsGoHeap
0 likes · 15 min read

This article walks through the five JVM runtime data areas, explains the distinction between the JVM specification and HotSpot implementation, compares the PermGen to Metaspace transition from JDK 8 to JDK 17, and provides hands‑on code to reproduce each type of memory‑related OutOfMemoryError.
HeapJVMJava
0 likes · 22 min read

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++HeapLinux
0 likes · 23 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 examines a production OutOfMemoryError caused by MyBatis SQL construction, explains heap and metaspace exhaustion, analyzes MyBatis source code, reproduces the issue with JVM settings, and offers practical recommendations to prevent similar memory failures.
BackendHeapJava
0 likes · 7 min read

This article explains why simple FIFO task handling in Go services can drown critical work, introduces priority queues as the algorithmic solution, and provides a complete, thread‑safe implementation with practical examples and common pitfalls.
AlgorithmBackendHeap
0 likes · 7 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 why the median is a crucial statistic for interpreting massive job‑application data, defines the median concept, introduces the classic LeetCode "Data Stream Median" problem, and shows how to maintain a dynamic median efficiently using a max‑heap and a min‑heap.
AlgorithmHeapLeetCode
0 likes · 12 min read

Even when a C++ program appears to run correctly, writing beyond allocated memory can corrupt heap metadata, causing a delayed crash at free(); this article explains the underlying malloc/free mechanisms, demonstrates the issue with code examples, and offers debugging tools and defensive programming practices to prevent such errors.
C++Heapdebugging
0 likes · 9 min read

This article explains the core principles of timers, compares heap‑based and timing‑wheel algorithms, analyzes Go's built‑in timer implementation versus C#'s approach, and provides practical optimization techniques for high‑concurrency, high‑precision scenarios.
C++GoHeap
0 likes · 10 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 explains C++ memory management fundamentals, detailing how delete and free release memory without explicit size knowledge, the role of stack, heap, data and code segments, differences between new/delete and malloc/free, array handling, common pitfalls, and interview questions with code examples.
C++DELETEHeap
0 likes · 34 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

This article provides a comprehensive overview of heap memory management in C, explaining the concepts of heap versus stack, the usage and internal mechanisms of malloc and free, common pitfalls such as memory leaks and dangling pointers, and compares these functions with new/delete, calloc, and realloc.
C++Heapfree
0 likes · 29 min read

The article lists the most frequent Java OutOfMemoryError variants, explains their root causes and typical scenarios, provides concrete code examples that trigger each error, and offers practical troubleshooting steps and JVM tuning recommendations for interview preparation.
HeapJVMJava
0 likes · 8 min read

This article explains how the Java Memory Model defines the interaction between threads, thread stacks, and the heap, illustrates these concepts with diagrams and example code, and discusses how modern hardware memory architecture, caches, and CPU registers affect visibility and race conditions in concurrent Java programs.
ConcurrencyHeapJava
0 likes · 11 min read

This article explains how the C functions malloc and free allocate and release memory, covering stack vs heap, the brk and mmap system calls, fragmentation, header metadata, and why both allocation strategies are needed for efficient memory management.
Heapbrkc-programming
0 likes · 17 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 provides a step‑by‑step guide to learning Python data structures, covering basic concepts, built‑in types, hands‑on practice, advanced structures, algorithm relationships, resources, community engagement, and continuous self‑challenge to improve problem‑solving skills.
AlgorithmsBFSHeap
0 likes · 6 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.
HeapLinuxVirtual Memory
0 likes · 15 min read

This article breaks down Java's three memory regions—Heap, Off‑Heap, and No‑Heap—detailing their definitions, management mechanisms, performance impacts, typical use cases, and provides concrete code samples for allocating each type of memory.
HeapJVMJava
0 likes · 18 min read

This comprehensive guide walks you through systematic JVM memory issue diagnosis, covering initial data collection, analysis of heap, metaspace, direct memory, stack problems, and practical command‑line tools, while offering actionable tips and real‑world examples for effective troubleshooting.
DirectMemoryHeapJVM
0 likes · 56 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 explains the treap data structure, detailing how each node stores a key and a priority to satisfy both binary‑search‑tree ordering and heap ordering, and walks through insertion, rotation, deletion, and a full Python implementation with concrete examples.
Data StructuresHeapPython
0 likes · 14 min read

The article explains how to use a max‑heap together with backtracking and a greedy strategy in Python to recommend the top three attractions with the highest scores while keeping the total travel distance under 20 km, and discusses the algorithm's steps, example execution, and limitations.
Data StructuresGreedy AlgorithmHeap
0 likes · 12 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

This article explains why memory leaks occur only with heap allocations in C, describes how malloc and related functions allocate memory, outlines two common ways to obtain heap memory, identifies the three essential elements of a leak, debunks common freeing misconceptions, and provides practical inspection steps to prevent leaks.
C++HeapMemory Leak
0 likes · 6 min read

This article explains what happens inside a computer when you request memory with malloc, covering the role of the standard library, the compilation and linking process, memory layout, heap allocation, fragmentation, and how the operating system expands the heap.
Heapc-programmingmalloc
0 likes · 6 min read

This article explains what happens inside a computer when you request memory with malloc, covering the C standard library, compilation, memory layout, heap allocation, fragmentation, and how the operating system expands the heap using system calls.
Heapc-programmingfragmentation
0 likes · 6 min read

This article explains how memory allocation works in C, covering the role of malloc, the distinction between code and user data, the compilation and linking process, heap organization, fragmentation, and how the operating system expands the heap when needed.
Heapc-programmingfragmentation
0 likes · 6 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 explains Go's heap implementation in the container/heap package, detailing the heap.Interface, core functions like Init, Push, Pop, Remove, and Fix, and demonstrates practical examples such as priority‑queue task scheduling, data‑stream merging, and real‑time calculations.
AlgorithmHeapcontainer/heap
0 likes · 10 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

This comprehensive guide presents a systematic, step‑by‑step process for diagnosing JVM memory problems—including heap, Metaspace, DirectMemory, JNI memory, and stack issues—using Alibaba Cloud ARMS, ATP, standard JDK tools, and best‑practice commands to quickly locate root causes and apply effective solutions.
GCHeapJVM
0 likes · 56 min read

This article explains the JVM memory model, detailing the five runtime data areas—heap, method area, JVM stack, native method stack, and program counter—along with their structures, configuration parameters, and roles in Java execution and performance tuning.
HeapJVMJava
0 likes · 9 min read

This article analyzes the shortcomings of existing Go caching libraries, introduces the MemoryCache project, explains its hash‑based bucket design, 4‑ary heap LRU implementation, unified timer strategy, and provides practical usage examples with code snippets for SetWithCallback and GetOrCreateWithCallback.
CachingHeapMemory Cache
0 likes · 13 min read

This article explains how the glibc malloc implementation (ptmalloc) manages memory by using arenas, chunks, and various bin structures such as fastbins, smallbins, largebins, and unsorted bins, and describes the step‑by‑step allocation process performed by public_mALLOc and its helper functions.
Heapglibcmalloc
0 likes · 14 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 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

This article explains Go 1.18 generics, covering type parameters, type sets, type inference, and shows how to simplify sorting, strconv.Append, heap, sync.Pool, and sync.Map with concise generic implementations and real code examples.
GenericsHeapsorting
0 likes · 24 min read

This article explains Linux's virtual address space layout, the six user‑space memory segments, how malloc decides between brk and mmap based on allocation size, the behavior of free, and why both allocation methods are needed for performance and memory management.
HeapLinuxSystem Programming
0 likes · 13 min read


政采云技术Dec 13, 2022 · Frontend Development
This article explains how JavaScript code is represented in V8's memory, covering primitive types, the roles of the stack, heap, and constant pool, as well as function prototypes, variable hoisting, and garbage collection, with clear examples and diagrams.
Constant PoolHeapV8
0 likes · 12 min read

This article provides a comprehensive overview of the Java Virtual Machine memory architecture, covering heap layout, object allocation, Metaspace, stack frames, native method stacks, program counters, direct memory, and code cache, complete with configuration tips and practical code examples.
HeapJVMgarbage collection
0 likes · 18 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

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 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 explains the TopK problem, compares sorting‑based O(nk) approaches with heap‑based O(n + k log n) and quick‑select O(n) methods, and provides complete Java implementations for each technique, helping readers ace interview questions on finding the largest K elements.
Heapquickselectsorting
0 likes · 13 min read

This article explains how to compute the maximum of each k‑sized sliding window over an integer array using both a priority‑queue (heap) approach and an optimized monotonic deque technique, complete with detailed walkthroughs, visual illustrations, and full Python code.
AlgorithmHeapdeque
0 likes · 9 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 provides a comprehensive overview of the Java Virtual Machine memory layout, explaining each region such as the heap, metaspace, stack, program counter, direct memory and code cache, along with allocation strategies, tuning parameters, and practical OOM demonstrations.
HeapJVMJava
0 likes · 16 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

This article explains the Java heap structure, generational layouts in JDK 1.7 and 1.8, the G1 collector's region-based approach, and detailed object allocation rules including Eden placement, large object handling, promotion thresholds, and space allocation guarantees.
HeapJVMJava
0 likes · 9 min read

This article explains the JVM heap memory area, its default and configurable sizes, the generational layout (Eden, Survivor, Old), how objects are allocated and promoted, and the various garbage‑collection mechanisms and JVM parameters that affect performance and memory usage.
HeapJVMJava
0 likes · 12 min read

This article introduces core data structures—hash tables, heaps, and graphs—explains their definitions, visual representations, and key operations, then delves into fundamental graph algorithms such as BFS, Dijkstra, Floyd, minimum spanning trees, and topological sorting, illustrating each with examples and code.
Data StructuresDijkstraGraph Algorithms
0 likes · 16 min read

This article introduces core data structures—hash tables, heaps, and graphs—explains their definitions, typical applications, and key algorithms such as shortest‑path (BFS, Dijkstra, Floyd), minimum spanning tree (Prim, Kruskal), and topological sorting, and provides a complete Java implementation of Dijkstra.
DijkstraGraphHash Table
0 likes · 16 min read

This article explains the Linux kernel's heap memory allocation process, covering the vm_area_struct and mm_struct data structures, the brk system call implementation, and the page‑fault handling that maps virtual addresses to physical memory, while also mentioning other allocation mechanisms such as mmap and HugePages.
HeapLinux kernelbrk system call
0 likes · 12 min read

This article provides a comprehensive overview of the Java Virtual Machine's memory layout, detailing the runtime data area—including the program counter, JVM stack, native method stack, heap, and metaspace—while explaining their structures, functions, common errors, and the role of JIT and escape analysis.
HeapJVMJava
0 likes · 12 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 why reading the ART virtual‑machine source is valuable, compares Dalvik and ART, outlines the GC source hierarchy, details the Space class architecture—including accounting, allocator, collector, and specific spaces like LargeObjectSpace, BumpPointerSpace, and RegionSpace—then analyzes heap construction, PreZygoteFork processing, memory‑map layout, and the full Java‑object allocation flow in ART.
ARTAndroidHeap
0 likes · 43 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 summarizes a range of practical methods—including Bloom filters, hashing, bit‑maps, heaps, bucket partitioning, database indexes, inverted indexes, external sorting, trie trees, and MapReduce—that are commonly used to handle, deduplicate, and query extremely large data volumes in big‑data applications.
HeapInverted Indexbig data
0 likes · 11 min read

This article explains React 16’s new Fiber architecture and its cooperative scheduling algorithm, showing how large diff tasks are split into small asynchronous units using priority queues and min‑heap structures, with code examples, performance visuals, and insights into real‑time and delayed task handling.
FiberHeapReact
0 likes · 20 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 provides a comprehensive overview of the Java Virtual Machine memory layout, explaining the roles and allocation strategies of the heap, metaspace, stack frames, program counter, direct memory, and code cache, and includes practical code examples for heap tuning and OOM demonstration.
HeapJVMJava
0 likes · 16 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 presents a concise Big O cheat sheet that aggregates the time‑complexity notations for common data structures, sorting algorithms, graph and heap operations, and visualizes performance curves, helping readers quickly recall best‑, worst‑, and average‑case scenarios.
Algorithm ComplexityBig OData Structures
0 likes · 3 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 provides a thorough introduction to heap data structures, covering their definition, core operations such as insertion and deletion, heap sort implementation, and practical production use cases like priority queues, Top‑K queries, and TP99 calculation, all illustrated with Java code examples.
AlgorithmHeapJava
0 likes · 17 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 article explains the JVM memory layout, how objects are reclaimed through reference counting and GC roots, compares major garbage‑collection algorithms, describes when objects are promoted to the old generation, and provides practical tuning tips to minimize Full GC pauses.
HeapJVMJava
0 likes · 12 min read

This article explains why a Java process consumes far more virtual memory than the configured heap size by detailing JVM subsystems, off‑heap allocations, native libraries, thread stacks, and other factors that contribute to overall memory usage.
HeapJVMJava
0 likes · 7 min read

This article enumerates the most frequent Java OutOfMemoryError scenarios—including heap space exhaustion, GC overhead limits, oversized array allocations, PermGen/Metaspace depletion, thread creation failures, and native method errors—detailing their causes and practical JVM flag or code fixes to resolve them.
GCHeapJVM
0 likes · 7 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


21CTOSep 21, 2018 · Big Data
This comprehensive guide explores essential strategies for handling massive datasets, covering hash-based structures, bucket partitioning, heap and quicksort techniques, trie trees, Bloom filters, external sorting, and MapReduce, and demonstrates how to efficiently solve common interview problems such as top‑K queries and duplicate removal.
AlgorithmData StructuresHash
0 likes · 35 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 Java's four reference types, the JVM's memory layout, object lifecycle states, common garbage‑collection algorithms, collector implementations, heap segmentation, class‑loading mechanics, and includes typical interview questions to help developers master memory management in Java.
HeapJVMgarbage collection
0 likes · 15 min read

This article introduces fundamental data structures such as arrays, linked lists, queues, stacks, sets, maps, various tree types including binary and AVL trees, and heaps, explaining their characteristics, time complexities, Java implementations like ArrayList, LinkedList, HashSet, TreeMap, and providing illustrative diagrams and code snippets.
AVL TreeAlgorithmsHashMap
0 likes · 23 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 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


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.
Data StructuresHeapPHP
0 likes · 3 min read
