Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » Inconsistent display of HashMap-keys
Inconsistent display of HashMap-keys [message #10034] Tue, 14 April 2009 07:43 Go to previous message
Stefan Lotties is currently offline Stefan Lotties
Messages: 3
Registered: July 2009
Junior Member
Hi,

I just opened two heap dumps and noticed a HashMap having String's as keys
and wondered why the keys were so big.

The display looks like this:

HashMap
- table java.util.HashMap$Entry[xxx]
-- <class> java.util.HashMap$Entry[]
-- [yyy] java.util.HashMap$Entry @ 0x...
--- <class> java.util.HashMap$Entry
--- key java.lang.String @ 0x... some_string (retained heap: 24)
---- <class> java.lang.String
---- value char[zzz] @ 0x... some_other_string (retained heap: 30,336)

I'm a little bit confused why the key-Member has actually a very low
retained heap size and displays a different string than the char[] inside
the String which has an even bigger retained heap size. This can be seen
on every HashMap-Entry I checked from this map (it contains actually
>100.000 elements ;). Is there anything I'm doing wrong in my very simple
assumption that the key should be the same as the char[] inside it?

Regards,
Stefan
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:IOException with (MAT+DTFJ) when reading a phd file
Next Topic:Leak suspect newer end
Goto Forum:
  


Current Time: Thu May 23 14:39:19 EDT 2013

Powered by FUDForum. Page generated in 0.01678 seconds