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

Unified Diff: runtime/vm/memory_region.h

Issue 320463003: Make unused semispace available to other isolates. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/dart.cc ('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/memory_region.h
===================================================================
--- runtime/vm/memory_region.h (revision 37032)
+++ runtime/vm/memory_region.h (working copy)
@@ -6,6 +6,7 @@
#define VM_MEMORY_REGION_H_
#include "platform/assert.h"
+#include "vm/allocation.h"
#include "vm/globals.h"
namespace dart {
@@ -13,10 +14,16 @@
// Memory regions are useful for accessing memory with bounds check in
// debug mode. They can be safely passed by value and do not assume ownership
// of the region.
-class MemoryRegion {
+class MemoryRegion : public ValueObject {
public:
MemoryRegion() : pointer_(NULL), size_(0) { }
MemoryRegion(void* pointer, uword size) : pointer_(pointer), size_(size) { }
+ MemoryRegion(const MemoryRegion& other) : ValueObject() { *this = other; }
+ MemoryRegion& operator=(const MemoryRegion& other) {
+ pointer_ = other.pointer_;
+ size_ = other.size_;
+ return *this;
+ }
void* pointer() const { return pointer_; }
uword size() const { return size_; }
@@ -68,8 +75,6 @@
void* pointer_;
uword size_;
-
- DISALLOW_COPY_AND_ASSIGN(MemoryRegion);
};
} // namespace dart
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698