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

Unified Diff: runtime/vm/pages.cc

Issue 18051007: - Revert r24564 and r24563 due to unexplained malloc corruption. (Closed) Base URL: http://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
« no previous file with comments | « runtime/vm/pages.h ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.cc
===================================================================
--- runtime/vm/pages.cc (revision 24564)
+++ runtime/vm/pages.cc (working copy)
@@ -321,6 +321,26 @@
}
+void PageSpace::SetPeer(RawObject* raw_obj, void* peer) {
+ if (peer == NULL) {
+ peer_table_.erase(raw_obj);
+ } else {
+ peer_table_[raw_obj] = peer;
+ }
+}
+
+
+void* PageSpace::GetPeer(RawObject* raw_obj) {
+ PeerTable::iterator it = peer_table_.find(raw_obj);
+ return (it == peer_table_.end()) ? NULL : it->second;
+}
+
+
+int64_t PageSpace::PeerCount() const {
+ return static_cast<int64_t>(peer_table_.size());
+}
+
+
void PageSpace::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
HeapPage* page = pages_;
while (page != NULL) {
« no previous file with comments | « runtime/vm/pages.h ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698