We've tried jdk 1.7.0_02. Ten days of running give 420 MB memory leak of the following objects:
- java.lang.management.MemoryUsage,
- [C (array of char),
- java.util.HashMap$Entry,
- [Ljava.util.HashMap$Entry (array of HashMap$Entry),
and some others.
This doesn't happen on jdk1.6.x.
First output of the "jmap -histo:live" command:
num #instances #bytes class name
----------------------------------------------
1: 229527 14926888 [C
2: 289290 13885920 java.lang.management.MemoryUsage
3: 321029 10272928 java.util.HashMap$Entry
4: 69923 10262184
5: 69923 9527672
6: 7048 7787040
7: 241693 7734176 java.lang.String
8: 2038 5898408 [Ljava.util.concurrent.ConcurrentHashMap$HashEntry;
9: 7048 5479056
10: 5954 4499552
11: 67844 4091672 [Ljava.util.HashMap$Entry;
12: 41250 3942848 [B
13: 65649 3151152 java.util.HashMap
14: 71891 2875640 java.util.TreeMap$Entry
...
Total 2320965 138000120
The last output of the "jmap -histo:live" command done in 10 days after the first:
num #instances #bytes class name
----------------------------------------------
1: 3147110 151061280 java.lang.management.MemoryUsage
2: 3178875 101724000 java.util.HashMap$Entry
3: 1087332 53822632 [C
4: 1099503 35184096 java.lang.String
5: 639442 31529224 [Ljava.util.HashMap$Entry;
6: 637247 30587856 java.util.HashMap
7: 629422 25176880 [Ljava.lang.management.MemoryUsage;
8: 314711 17623816 com.sun.management.GcInfo
9: 70107 10292776
10: 631864 10109824 java.util.HashMap$EntrySet
11: 314711 10070752 sun.management.GcInfoCompositeData
12: 70107 9552696
13: 7075 7817080
14: 314713 7554128 [Ljava.lang.Integer;
15: 2048 5898744 [Ljava.util.concurrent.ConcurrentHashMap$HashEntry;
16: 7075 5497200
17: 315792 5052672 java.lang.Integer
18: 47680 4912352 [B
...
Total 13206419 558217856
I also have 8 other histograms, made after each day of the tests. They show linear number of objects increasing. This is definitely not a noise. It is a stable leak 42 MB per day.
Did you observe similar behavior? In what scenarios? How did you cope with it?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)