Tag

Reference Counting

0 views collected around this technical thread.

DaTaobao Tech
DaTaobao Tech
Oct 28, 2024 · Fundamentals

Garbage Collection Algorithms and Reference Counting in QuickJS

QuickJS manages memory using reference counting for each object combined with a cycle‑collector that periodically scans roots, decrements child references, and frees objects whose counts drop to zero, while also supporting traditional reachability‑based garbage‑collection techniques such as mark‑sweep, copying, and generational collection.

AlgorithmC++Garbage Collection
0 likes · 9 min read
Garbage Collection Algorithms and Reference Counting in QuickJS
Tencent Cloud Developer
Tencent Cloud Developer
Apr 3, 2024 · Fundamentals

Seven Common GC Algorithms: Principles, Comparisons, and Optimizations

The article surveys seven common garbage‑collection algorithms—Mark‑Sweep, Reference Counting, Copying, Mark‑Compact, Conservative, Generational, and Incremental/Tri‑color—explaining their principles, strengths, weaknesses, evaluation criteria such as throughput and pause time, and practical optimizations, emphasizing that the best choice depends on specific application needs.

GC AlgorithmsGarbage CollectionGenerational GC
0 likes · 42 min read
Seven Common GC Algorithms: Principles, Comparisons, and Optimizations
JD Tech
JD Tech
Jun 26, 2023 · Backend Development

Debugging and Resolving Netty Long‑Connection Memory Leak Issues

This article details a real‑world Netty long‑connection memory‑leak case, explains how to reproduce the problem, uses Netty's advanced leak detection to pinpoint the faulty ByteBuf usage, and presents three practical remediation strategies to permanently fix the leak.

Backend DevelopmentJavaMemory Leak
0 likes · 14 min read
Debugging and Resolving Netty Long‑Connection Memory Leak Issues
Architect's Guide
Architect's Guide
Dec 29, 2022 · Fundamentals

Understanding Java Garbage Collection Algorithms and JVM GC Strategies

This article explains what constitutes garbage in the Java heap, compares reference‑counting and root‑reachability approaches, demonstrates a reference‑counting example, and reviews the main garbage‑collection algorithms and collectors (Serial, ParNew, Parallel Scavenge, Serial Old, Parallel Old, CMS, G1) used by modern JVMs.

G1GC AlgorithmsGarbage Collection
0 likes · 19 min read
Understanding Java Garbage Collection Algorithms and JVM GC Strategies
Python Programming Learning Circle
Python Programming Learning Circle
Aug 2, 2022 · Fundamentals

Understanding Python's Integer Caching and Reference Counting

The article explains how CPython implements integers as variable‑length base‑2³⁰ arrays, pre‑allocates the small‑integer range –5 to 256 as singleton objects for performance, and demonstrates the effect of this caching using the id() function and reference‑count analysis.

CPythonMemory OptimizationReference Counting
0 likes · 5 min read
Understanding Python's Integer Caching and Reference Counting
Python Programming Learning Circle
Python Programming Learning Circle
Dec 2, 2021 · Fundamentals

Understanding Python Garbage Collection: Reference Counting, Mark‑Sweep, and Generational GC

This article explains how Python’s automatic garbage collection works, covering reference counting, the problems of cyclic references, the mark‑and‑sweep algorithm, generational collection, default thresholds, and when and how to manually control the collector with code examples.

Garbage CollectionGenerational GCMemory Management
0 likes · 7 min read
Understanding Python Garbage Collection: Reference Counting, Mark‑Sweep, and Generational GC
iQIYI Technical Product Team
iQIYI Technical Product Team
Aug 20, 2021 · Mobile Development

Efficient Bitmap Reuse in Android Using InBitmap and Reference Counting

The article presents a high‑efficiency Android bitmap‑reuse strategy that combines the inBitmap API with atomic reference counting and a three‑layer LRU cache (active, LruCache, InBitmapPool), dramatically lowering garbage‑collection pauses and achieving over 80 % reuse on pre‑Android 8 devices.

AndroidBitMapImage Reuse
0 likes · 20 min read
Efficient Bitmap Reuse in Android Using InBitmap and Reference Counting
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 7, 2021 · Fundamentals

Understanding Java Garbage Collection: Reference Counting, Reachability Analysis, and Major GC Algorithms

This article explains how Java determines which objects are eligible for garbage collection using reference counting and reachability analysis, describes the main garbage‑collection algorithms such as mark‑sweep, mark‑compact, and mark‑copy, and outlines the generational GC process including MinorGC and survivor spaces.

Garbage CollectionGenerational GCJava
0 likes · 7 min read
Understanding Java Garbage Collection: Reference Counting, Reachability Analysis, and Major GC Algorithms
Python Programming Learning Circle
Python Programming Learning Circle
Mar 20, 2021 · Fundamentals

Understanding Python Object Memory Management and Garbage Collection

This article explains Python's memory management, covering object references, identity via id(), reference counting, caching of small objects, the use of the is operator, handling of reference cycles with objgraph, manual reference deletion, and the generational garbage collection mechanism including thresholds and cycle detection.

Garbage CollectionGenerational GCMemory Management
0 likes · 12 min read
Understanding Python Object Memory Management and Garbage Collection
Byte Quality Assurance Team
Byte Quality Assurance Team
Mar 10, 2021 · Fundamentals

Understanding Python Garbage Collection and Reference Counting

This article explains Python's garbage collection mechanism, covering object management, reference counting, cyclic reference handling, the mark‑and‑sweep algorithm, and generational collection thresholds, with illustrative code examples and detailed explanations of each step.

Garbage CollectionGenerational GCMemory Management
0 likes · 9 min read
Understanding Python Garbage Collection and Reference Counting
Wukong Talks Architecture
Wukong Talks Architecture
Nov 20, 2020 · Backend Development

Understanding PHP Garbage Collection and Reference Counting

This article explains PHP's garbage collection mechanism, detailing how reference counting works, the role of zval structures, the identification and reclamation process, and provides source code insights to compare PHP's approach with Java's garbage collection.

Backend DevelopmentGarbage CollectionMemory Management
0 likes · 9 min read
Understanding PHP Garbage Collection and Reference Counting
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 30, 2020 · Fundamentals

Understanding Java Garbage Collection: Goals, Algorithms, and Timing

This article explains Java garbage collection by outlining its purpose, the criteria for reclaimable objects through reference counting and reachability analysis, when collection occurs, and the main GC algorithms—including mark‑sweep, copying, mark‑compact, and generational collection—along with common JVM collectors.

GC AlgorithmsGarbage CollectionJVM
0 likes · 9 min read
Understanding Java Garbage Collection: Goals, Algorithms, and Timing
Python Programming Learning Circle
Python Programming Learning Circle
Jun 22, 2020 · Fundamentals

Understanding Python Memory Management and Reference Counting

This article explains how Python stores every value as an object in memory, how reference counting works to track object usage, and how the garbage collector frees objects when their reference count drops to zero, illustrated with interactive code examples.

Garbage CollectionMemory ManagementReference Counting
0 likes · 7 min read
Understanding Python Memory Management and Reference Counting
Python Programming Learning Circle
Python Programming Learning Circle
Mar 27, 2020 · Fundamentals

Understanding Python Memory Management: Reference Counting, Circular References, and Generational Garbage Collection

Python abstracts memory management through reference counting, handles cyclic references with a generational garbage collector, and employs the weak generational hypothesis to efficiently reclaim objects, as illustrated by code examples demonstrating object creation, deletion, and the behavior of different GC generations.

Garbage CollectionGenerational GCMemory Management
0 likes · 8 min read
Understanding Python Memory Management: Reference Counting, Circular References, and Generational Garbage Collection
Selected Java Interview Questions
Selected Java Interview Questions
Nov 29, 2019 · Fundamentals

Understanding Object Liveness Determination in Java: Reference Counting and Reachability Analysis

The article explains how Java determines whether an object is alive using two main garbage‑collection algorithms—Reference Counting and Reachability Analysis—detailing their mechanisms, limitations such as circular references, the role of GC Roots, finalization, and method‑area reclamation, with illustrative code examples.

Garbage CollectionJVMJava
0 likes · 6 min read
Understanding Object Liveness Determination in Java: Reference Counting and Reachability Analysis
Architecture Digest
Architecture Digest
Nov 7, 2019 · Fundamentals

How the JVM Determines Object Liveness and Its Garbage Collection Algorithms

This article explains the JVM memory model, how the JVM decides whether an object is alive using reference counting and reachability analysis, and describes the main garbage‑collection algorithms—including mark‑sweep, mark‑compact, copying, and generational collection—along with their advantages and drawbacks.

Garbage CollectionGenerational GCJVM
0 likes · 8 min read
How the JVM Determines Object Liveness and Its Garbage Collection Algorithms
Bitu Technology
Bitu Technology
Dec 18, 2018 · Backend Development

Managing Request Context in Node.js with async_hooks without Monkey Patching

This article explains how to propagate request‑level context in a Node.js HTTP service by building a call‑tree with async_hooks, avoiding monkey‑patching, handling lifecycle quirks, preventing memory leaks, and using reference‑counted cleanup to ensure reliable context queries.

BackendMemory LeakNode.js
0 likes · 15 min read
Managing Request Context in Node.js with async_hooks without Monkey Patching
Baidu Intelligent Testing
Baidu Intelligent Testing
Sep 1, 2017 · Fundamentals

Understanding Python Garbage Collection and Memory Leaks

This article explains Python's garbage collection mechanisms, demonstrates how reference counting works, shows how to detect and fix memory leaks using the gc module, and illustrates the issue with urllib2 through code examples and visual diagrams.

Garbage CollectionMemory LeakReference Counting
0 likes · 5 min read
Understanding Python Garbage Collection and Memory Leaks
Baidu Intelligent Testing
Baidu Intelligent Testing
Dec 9, 2015 · Backend Development

Debugging a Memory Leak in Baidu's Bigpipe Broker Using GDB and pmap

This article describes how Baidu's QA team identified and resolved a memory‑leak issue in the Bigpipe Broker backend by analyzing a live process with pmap and GDB, extracting reference‑count problems, and fixing the atomic_add misuse that caused the leak.

BackendC++GDB
0 likes · 9 min read
Debugging a Memory Leak in Baidu's Bigpipe Broker Using GDB and pmap
Baidu Intelligent Testing
Baidu Intelligent Testing
Dec 2, 2015 · Backend Development

Debugging a Memory Leak in Baidu's Bigpipe Broker Using GDB and Live Process Inspection

This article presents a step‑by‑step case study of locating and fixing a memory‑leak problem in Baidu's Bigpipe Broker backend by analyzing a running leaking process with GDB, pmap, and custom scripts, highlighting the pitfalls of Valgrind and the importance of clear function naming.

Backend DevelopmentC++Memory Leak
0 likes · 10 min read
Debugging a Memory Leak in Baidu's Bigpipe Broker Using GDB and Live Process Inspection