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

Unified Diff: runtime/vm/verified_memory.cc

Issue 2112043002: Land Ivan's change of 'Remove support for verified memory handling' (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address code review comments. Created 4 years, 6 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/verified_memory.h ('k') | runtime/vm/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/verified_memory.cc
diff --git a/runtime/vm/verified_memory.cc b/runtime/vm/verified_memory.cc
deleted file mode 100644
index a3a3d9eca78845c974f06e50a4f51c3cac9c0928..0000000000000000000000000000000000000000
--- a/runtime/vm/verified_memory.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "vm/verified_memory.h"
-
-namespace dart {
-
-#if defined(DEBUG)
-
-DEFINE_FLAG(bool, verified_mem, false,
- "Enable write-barrier verification mode (slow, DEBUG only).");
-DEFINE_FLAG(int, verified_mem_max_reserve_mb, (kWordSize <= 4) ? 16 : 32,
- "When verified_mem is true, largest supported reservation (MB).");
-
-
-VirtualMemory* VerifiedMemory::ReserveInternal(intptr_t size) {
- if (size > offset()) {
- FATAL1("Requested reservation of %" Pd " bytes exceeds the limit. "
- "Use --verified_mem_max_reserve_mb to increase it.", size);
- }
- VirtualMemory* result = VirtualMemory::Reserve(size + offset());
- if (result != NULL) {
- // Commit the offset part of the reservation (writable, not executable).
- result->Commit(result->start() + offset(), size, /* executable = */ false);
- // Truncate without unmapping, so that the returned object looks like
- // a normal 'size' bytes reservation (but VirtualMemory will correctly
- // unmap the entire original reservation on destruction).
- result->Truncate(size, /* try_unmap = */ false);
- }
- return result;
-}
-
-#endif // DEBUG
-
-} // namespace dart
« no previous file with comments | « runtime/vm/verified_memory.h ('k') | runtime/vm/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698