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

Unified Diff: runtime/vm/isolate.cc

Issue 18259014: Object ID Ring with tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 14c2392cdaf4aa5329d4d8a20a14170a9ab50367..9e6189fd2109022defdde90301b10ecd2549b900 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -26,6 +26,7 @@
#include "vm/thread.h"
#include "vm/timer.h"
#include "vm/visitor.h"
+#include "vm/object_id_ring.h"
namespace dart {
@@ -415,6 +416,7 @@ Isolate::Isolate()
stacktrace_(NULL),
stack_frame_index_(-1),
object_histogram_(NULL),
+ object_id_ring_(NULL),
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
reusable_handles_() {
if (FLAG_print_object_histogram && (Dart::vm_isolate() != NULL)) {
@@ -1068,6 +1070,17 @@ char* Isolate::GetStatus(const char* request) {
}
+void Isolate::set_object_id_ring(ObjectIdRing* ring) {
+ ASSERT(heap_ != NULL);
+ object_id_ring_ = ring;
+ if (ring == NULL) {
+ heap_->set_object_id_ring_table(NULL, 0);
+ } else {
+ heap_->set_object_id_ring_table(ring->table_, ring->capacity_);
+ }
+}
+
+
template<class T>
T* Isolate::AllocateReusableHandle() {
T* handle = reinterpret_cast<T*>(reusable_handles_.AllocateScopedHandle());
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/object_id_ring.h » ('j') | runtime/vm/object_id_ring.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698