comparison src/share/vm/gc_implementation/parNew/parNewGeneration.hpp @ 695:becb17ad5e51

6824570: ParNew: Fix memory leak introduced in 6819891 Summary: Allocate worker-local overflow stacks, introduced in 6819891, along with ParNewGeneration, rather than with the per-scavenge ParScanThreadState. Reviewed-by: jmasa
author ysr
date Thu, 02 Apr 2009 15:57:41 -0700
parents cea947c8a988
children e018e6884bd8
comparison
equal deleted inserted replaced
679:cea947c8a988 695:becb17ad5e51
31 31
32 // It would be better if these types could be kept local to the .cpp file, 32 // It would be better if these types could be kept local to the .cpp file,
33 // but they must be here to allow ParScanClosure::do_oop_work to be defined 33 // but they must be here to allow ParScanClosure::do_oop_work to be defined
34 // in genOopClosures.inline.hpp. 34 // in genOopClosures.inline.hpp.
35 35
36 typedef OopTaskQueue ObjToScanQueue; 36 typedef OopTaskQueue ObjToScanQueue;
37 typedef OopTaskQueueSet ObjToScanQueueSet; 37 typedef OopTaskQueueSet ObjToScanQueueSet;
38 38
39 // Enable this to get push/pop/steal stats. 39 // Enable this to get push/pop/steal stats.
40 const int PAR_STATS_ENABLED = 0; 40 const int PAR_STATS_ENABLED = 0;
41 41
42 class ParKeepAliveClosure: public DefNewGeneration::KeepAliveClosure { 42 class ParKeepAliveClosure: public DefNewGeneration::KeepAliveClosure {
114 114
115 void record_survivor_plab(HeapWord* plab_start, size_t plab_word_size); 115 void record_survivor_plab(HeapWord* plab_start, size_t plab_word_size);
116 116
117 ParScanThreadState(Space* to_space_, ParNewGeneration* gen_, 117 ParScanThreadState(Space* to_space_, ParNewGeneration* gen_,
118 Generation* old_gen_, int thread_num_, 118 Generation* old_gen_, int thread_num_,
119 ObjToScanQueueSet* work_queue_set_, size_t desired_plab_sz_, 119 ObjToScanQueueSet* work_queue_set_,
120 GrowableArray<oop>** overflow_stack_set_,
121 size_t desired_plab_sz_,
120 ParallelTaskTerminator& term_); 122 ParallelTaskTerminator& term_);
121 123
122 public: 124 public:
123 ageTable* age_table() {return &_ageTable;} 125 ageTable* age_table() {return &_ageTable;}
124 126
294 struct ObjToScanQueuePadded { 296 struct ObjToScanQueuePadded {
295 ObjToScanQueue work_queue; 297 ObjToScanQueue work_queue;
296 char pad[64 - sizeof(ObjToScanQueue)]; // prevent false sharing 298 char pad[64 - sizeof(ObjToScanQueue)]; // prevent false sharing
297 }; 299 };
298 300
299 // The per-thread work queues, available here for stealing. 301 // The per-worker-thread work queues
300 ObjToScanQueueSet* _task_queues; 302 ObjToScanQueueSet* _task_queues;
303
304 // Per-worker-thread local overflow stacks
305 GrowableArray<oop>** _overflow_stacks;
301 306
302 // Desired size of survivor space plab's 307 // Desired size of survivor space plab's
303 PLABStats _plab_stats; 308 PLABStats _plab_stats;
304 309
305 // A list of from-space images of to-be-scanned objects, threaded through 310 // A list of from-space images of to-be-scanned objects, threaded through