Fix leak in optimizing compiler thread.
R=mvstanton@chromium.org BUG= Review URL: https://codereview.chromium.org/27473006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b8dd056fa2
commit
e0508615a9
@ -37,6 +37,19 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
OptimizingCompilerThread::~OptimizingCompilerThread() {
|
||||
ASSERT_EQ(0, input_queue_length_);
|
||||
DeleteArray(input_queue_);
|
||||
if (FLAG_concurrent_osr) {
|
||||
#ifdef DEBUG
|
||||
for (int i = 0; i < osr_buffer_capacity_; i++) {
|
||||
CHECK_EQ(NULL, osr_buffer_[i]);
|
||||
}
|
||||
#endif
|
||||
DeleteArray(osr_buffer_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OptimizingCompilerThread::Run() {
|
||||
#ifdef DEBUG
|
||||
|
@ -63,20 +63,14 @@ class OptimizingCompilerThread : public Thread {
|
||||
blocked_jobs_(0) {
|
||||
NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(CONTINUE));
|
||||
input_queue_ = NewArray<RecompileJob*>(input_queue_capacity_);
|
||||
if (FLAG_concurrent_osr) {
|
||||
// Allocate and mark OSR buffer slots as empty.
|
||||
osr_buffer_ = NewArray<RecompileJob*>(osr_buffer_capacity_);
|
||||
// Mark OSR buffer slots as empty.
|
||||
for (int i = 0; i < osr_buffer_capacity_; i++) osr_buffer_[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
~OptimizingCompilerThread() {
|
||||
ASSERT_EQ(0, input_queue_length_);
|
||||
#ifdef DEBUG
|
||||
for (int i = 0; i < osr_buffer_capacity_; i++) {
|
||||
CHECK_EQ(NULL, osr_buffer_[i]);
|
||||
}
|
||||
#endif
|
||||
DeleteArray(osr_buffer_);
|
||||
}
|
||||
~OptimizingCompilerThread();
|
||||
|
||||
void Run();
|
||||
void Stop();
|
||||
|
Loading…
Reference in New Issue
Block a user