---
title: "Discussion on \"Rendering the Java heap as a Treemap\" | Hashnode"
description: "Discussion on \"Rendering the Java heap as a Treemap\". A failed experiment with dominator trees"
url: "https://hashnode.com/posts/rendering-the-java-heap-as-a-treemap/66f393828d003f4cd95af5ae"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Rendering the Java heap as a Treemap](https://blog.p-y.wtf/rendering-the-java-heap-as-a-treemap?utm_source=hashnode&utm_medium=feed)

A failed experiment with dominator trees

Sep 25, 2024 · 9 min read · blog.p-y.wtf  
Updated Sep 26, 2024  
Read the article

-   [#computer-science](https://hashnode.com/tag/computer-science)
-   [#graph-theory](https://hashnode.com/tag/graph-theory)
-   [#java](https://hashnode.com/tag/java)
-   [#kotlin](https://hashnode.com/tag/kotlin)
-   [#android](https://hashnode.com/tag/android)
-   [#memory-management](https://hashnode.com/tag/memory-management)

## Written by

[Pierre-Yves Ricau](https://hashnode.com/@py)

@py · San Francisco

  
[View profile](https://hashnode.com/@py)

Deep dives

My pronouns are he / him. Android Engineer at Square / Block. A few things I enjoy: Publishing Open Source libraries (LeakCanary, Curtains, Radiography, square/logcat) Rollerblading Writing technical blogs (previously on dev.to/pyricau) Cooking Giving tech talks Reading sci-fi

## Responses 1

Markdown supported · ⌘↵ to post

[Nam Nguyen](https://hashnode.com/@eneim)

[Sep 25, 2024](https://hashnode.com/posts/rendering-the-java-heap-as-a-treemap/66f393828d003f4cd95af5ae/comment/66f3a653a8533947e2d47ef2)

> a dominator node D of a node A is a node that if removed would make A unreachable

Should this be reversed? If you remove node D in the sample, node A is still reachable by the Root node.

Edit: or perhaps you didn't mean the `A` and `D` in the example are the same as `A` and `D` in this definition.

[Pierre-Yves Ricau](https://hashnode.com/@py)

[Sep 26, 2024](https://hashnode.com/posts/rendering-the-java-heap-as-a-treemap/66f393828d003f4cd95af5ae/comment/66f3a653a8533947e2d47ef2#reply-66f4bf0832bd29e5e1b16e2f)

I wrote the example later without re reading the definition I gave.. that was confusing! Fixed it, thanks!
