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 v8 {
|
||||||
namespace internal {
|
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() {
|
void OptimizingCompilerThread::Run() {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -63,20 +63,14 @@ class OptimizingCompilerThread : public Thread {
|
|||||||
blocked_jobs_(0) {
|
blocked_jobs_(0) {
|
||||||
NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(CONTINUE));
|
NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(CONTINUE));
|
||||||
input_queue_ = NewArray<RecompileJob*>(input_queue_capacity_);
|
input_queue_ = NewArray<RecompileJob*>(input_queue_capacity_);
|
||||||
osr_buffer_ = NewArray<RecompileJob*>(osr_buffer_capacity_);
|
if (FLAG_concurrent_osr) {
|
||||||
// Mark OSR buffer slots as empty.
|
// Allocate and mark OSR buffer slots as empty.
|
||||||
for (int i = 0; i < osr_buffer_capacity_; i++) osr_buffer_[i] = NULL;
|
osr_buffer_ = NewArray<RecompileJob*>(osr_buffer_capacity_);
|
||||||
|
for (int i = 0; i < osr_buffer_capacity_; i++) osr_buffer_[i] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~OptimizingCompilerThread() {
|
~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_);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Run();
|
void Run();
|
||||||
void Stop();
|
void Stop();
|
||||||
|
Loading…
Reference in New Issue
Block a user