Post

Debugging Memory Leaks in Java NIO Systems

One of our systems with heavy NIO usage showed gradual memory leaks.

Root cause:

  • Direct byte buffers not released properly
  • Missing Cleaner references in old JDK

Tools used:

  • jcmd and jmap
  • Eclipse MAT
  • Manual tracking of buffer allocations

Lesson: Off-heap memory is not magic — it leaks too.

This post is licensed under CC BY 4.0 by the author.