A customer pointed out where GrowableArray is not released.
The following source code maps GrowableArray to c heap.
However, the customer can not find out where GrowableArray object are released.
[hotspot/src/share/vm/memory/concurrentMarkSweepGeneration.cpp]
6478 void CMSCollector::preserve_mark_work(oop p, markOop m) {
6479 int PreserveMarkStackSize = 128;
6480
6481 if (_preserved_oop_stack == NULL) {
6482 assert(_preserved_mark_stack == NULL,
6483 "bijection with preserved_oop_stack");
6484 // Allocate the stacks
6485 _preserved_oop_stack = new (ResourceObj::C_HEAP)
6486 GrowableArray<oop>(PreserveMarkStackSize, true);
6487 _preserved_mark_stack = new (ResourceObj::C_HEAP)
6488 GrowableArray<markOop>(PreserveMarkStackSize, true);
6489 if (_preserved_oop_stack == NULL || _preserved_mark_stack == NULL) {
6490 vm_exit_out_of_memory(2* PreserveMarkStackSize * sizeof(oop) /* punt */,
6491 "Preserved Mark/Oop Stack for CMS (C-heap)");
6492 }
6493 }
6494 _preserved_oop_stack->push(p);
6495 _preserved_mark_stack->push(m);
6496 assert(m == p->mark(), "Mark word changed");
6497 assert(_preserved_oop_stack->length() == _preserved_mark_stack->length(),
6498 "bijection");
6499 }
[hotspot/src/share/vm/utilities/taskqueue.hpp]
449 void ChunkTaskQueueWithOverflow::initialize() {
450 _chunk_queue.initialize();
451 assert(_overflow_stack == 0, "Creating memory leak");
452 _overflow_stack =
453 new (ResourceObj::C_HEAP) GrowableArray<ChunkTask>(10, true);
454 }
[hotspot/src/share/vm/utilities/histogram.cpp]
56 Histogram::Histogram(const char* title,int estimatedCount) {
57 _title = title;
58 _elements = new (ResourceObj::C_HEAP) GrowableArray<HistogramElement*>(estimatedCount,true);
59 }
The following source code maps GrowableArray to c heap.
However, the customer can not find out where GrowableArray object are released.
[hotspot/src/share/vm/memory/concurrentMarkSweepGeneration.cpp]
6478 void CMSCollector::preserve_mark_work(oop p, markOop m) {
6479 int PreserveMarkStackSize = 128;
6480
6481 if (_preserved_oop_stack == NULL) {
6482 assert(_preserved_mark_stack == NULL,
6483 "bijection with preserved_oop_stack");
6484 // Allocate the stacks
6485 _preserved_oop_stack = new (ResourceObj::C_HEAP)
6486 GrowableArray<oop>(PreserveMarkStackSize, true);
6487 _preserved_mark_stack = new (ResourceObj::C_HEAP)
6488 GrowableArray<markOop>(PreserveMarkStackSize, true);
6489 if (_preserved_oop_stack == NULL || _preserved_mark_stack == NULL) {
6490 vm_exit_out_of_memory(2* PreserveMarkStackSize * sizeof(oop) /* punt */,
6491 "Preserved Mark/Oop Stack for CMS (C-heap)");
6492 }
6493 }
6494 _preserved_oop_stack->push(p);
6495 _preserved_mark_stack->push(m);
6496 assert(m == p->mark(), "Mark word changed");
6497 assert(_preserved_oop_stack->length() == _preserved_mark_stack->length(),
6498 "bijection");
6499 }
[hotspot/src/share/vm/utilities/taskqueue.hpp]
449 void ChunkTaskQueueWithOverflow::initialize() {
450 _chunk_queue.initialize();
451 assert(_overflow_stack == 0, "Creating memory leak");
452 _overflow_stack =
453 new (ResourceObj::C_HEAP) GrowableArray<ChunkTask>(10, true);
454 }
[hotspot/src/share/vm/utilities/histogram.cpp]
56 Histogram::Histogram(const char* title,int estimatedCount) {
57 _title = title;
58 _elements = new (ResourceObj::C_HEAP) GrowableArray<HistogramElement*>(estimatedCount,true);
59 }
- relates to
-
JDK-6751861 Memory leak occurs in JVMTI(jdk5.0u16)
-
- Resolved
-