Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1127)

Unified Diff: runtime/vm/store_buffer.cc

Issue 1309603003: Fix reuse of free blocks and delete global cache on VM shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Commit. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/store_buffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/store_buffer.cc
diff --git a/runtime/vm/store_buffer.cc b/runtime/vm/store_buffer.cc
index 7fe58c74290511b3938a448735e28b89494a8940..ca1ff21bbf192269f5d4e80e81bc0206cacfa253 100644
--- a/runtime/vm/store_buffer.cc
+++ b/runtime/vm/store_buffer.cc
@@ -26,6 +26,12 @@ void StoreBuffer::InitOnce() {
}
+void StoreBuffer::ShutDown() {
+ delete global_empty_;
+ delete global_mutex_;
+}
+
+
StoreBuffer::StoreBuffer() : mutex_(new Mutex()) {
}
@@ -105,7 +111,7 @@ StoreBufferBlock* StoreBuffer::PopEmptyBlock() {
{
MutexLocker ml(global_mutex_);
if (!global_empty_->IsEmpty()) {
- global_empty_->Pop();
+ return global_empty_->Pop();
}
}
return new StoreBufferBlock();
« no previous file with comments | « runtime/vm/store_buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698