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

Unified Diff: runtime/vm/pages.cc

Issue 2609643002: 1. Avoid potential dead lock due to lock-order-inversion (Closed)
Patch Set: Address code review changes. Created 3 years, 11 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/heap.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 4c7d49d417abc6b30b58ae8199676f198aa96d4d..1d7cb9afd6c4be4c125d531f11b3fefd8d042d57 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -381,9 +381,6 @@ uword PageSpace::TryAllocateInternal(intptr_t size,
bool is_locked) {
ASSERT(size >= kObjectAlignment);
ASSERT(Utils::IsAligned(size, kObjectAlignment));
-#ifdef DEBUG
- SpaceUsage usage_before = GetCurrentUsage();
-#endif
uword result = 0;
if (size < kAllocatablePageSize) {
if (is_locked) {
@@ -420,14 +417,6 @@ uword PageSpace::TryAllocateInternal(intptr_t size,
}
}
}
-#ifdef DEBUG
- if (result != 0) {
- // A successful allocation should increase usage_.
- ASSERT(usage_before.used_in_words < usage_.used_in_words);
- }
-// Note we cannot assert that a failed allocation should not change
-// used_in_words as another thread could have changed used_in_words.
-#endif
ASSERT((result & kObjectAlignmentMask) == kOldObjectAlignmentOffset);
return result;
}
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698