Project

General

Profile

Ghostbuster2 monitoredObjects

Hic cup
Added almost 3 years ago

hi!

monitoredObjects defined as "Map" in Ghostbuster2.java

line 134    monitoredObjects.put(occupantJid, o);

and

line 273    this.monitoredObjects.remove(obj);
...
line 307    monitoredObjects.remove(o);

How could it remove by val instead of the key?

After test by tsung, memory usage never reduce. so i inspect memdump via MAT. Partial as follow

Class Name                                                             | Shallow Heap | Retained Heap | Percentage
-------------------------------------------------------------------------------------------------------------------
tigase.muc.Ghostbuster2 @ 0x641429840                                  |           32 |    83,217,072 |     65.70%
|- java.util.concurrent.ConcurrentHashMap @ 0x641429860                |           64 |    83,217,024 |     65.70%
|  |- java.util.concurrent.ConcurrentHashMap$Node[262144] @ 0x646a0e1e8|    1,048,592 |    83,216,944 |     65.70%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6444dfca8     |           32 |         3,888 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6444e2f38     |           32 |         3,816 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x642029d88     |           32 |         3,296 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6444b8270     |           32 |         3,240 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6444dc170     |           32 |         3,232 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x64270c230     |           32 |         3,208 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x643d79280     |           32 |         3,208 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x646b9ed10     |           32 |         3,208 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x64292d3d0     |           32 |         3,208 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x642f7e6a0     |           32 |         3,168 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6444de718     |           32 |         3,152 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x644feb078     |           32 |         3,136 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x643264438     |           32 |         3,136 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x64521c218     |           32 |         3,136 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6424089b8     |           32 |         3,136 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6444d5ff0     |           32 |         3,136 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6421b2188     |           32 |         3,112 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x646b57688     |           32 |         3,088 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6429e5b68     |           32 |         3,088 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x643414fc8     |           32 |         3,088 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6436d4c60     |           32 |         3,072 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x642d1e8f0     |           32 |         3,064 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x6442a3fc8     |           32 |         3,064 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x641f8b678     |           32 |         3,064 |      0.00%
|  |  |- java.util.concurrent.ConcurrentHashMap$Node @ 0x642f90308     |           32 |         3,056 |      0.00%
|  |  '- Total: 25 of 103,546 entries; 103,521 more                    |              |               |           


Replies (3)

(1)
Avatar?id=6098&size=32x32

Added by Bartosz Małkowski TigaseTeam almost 3 years ago

And fixed.

Added by Hic cup almost 3 years ago

thx!

    (1-3/3)