Tagged articles
4 articles
Page 1 of 1
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Mar 20, 2025 · Backend Development

Why Does Pointer Collision Cause Concurrency Bugs in Java and How to Fix It?

Pointer collision is an efficient memory allocation technique that can trigger severe concurrency problems in multithreaded Java environments, and this article explains the underlying causes, illustrates conflict scenarios, and presents common remedies such as CAS (Compare‑And‑Swap) and TLAB (Thread‑Local Allocation Buffer) with sample code.

CASTLABjava
0 likes · 6 min read
Why Does Pointer Collision Cause Concurrency Bugs in Java and How to Fix It?
Selected Java Interview Questions
Selected Java Interview Questions
Nov 17, 2024 · Backend Development

Understanding Java Object Allocation: Stack Allocation, TLAB, and Performance Impact

This article examines a Java micro‑benchmark that measures object creation time, explains why printing objects dramatically slows execution, and details JVM allocation strategies such as stack allocation, escape analysis, scalar replacement, and Thread‑Local Allocation Buffers (TLAB) with relevant parameters.

JVMObject AllocationStack Allocation
0 likes · 6 min read
Understanding Java Object Allocation: Stack Allocation, TLAB, and Performance Impact