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

Side by Side Diff: runtime/vm/allocation.h

Issue 855533002: Isolate/Thread split: Isolate -> Zone for LocationSummary. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/allocation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_ALLOCATION_H_ 5 #ifndef VM_ALLOCATION_H_
6 #define VM_ALLOCATION_H_ 6 #define VM_ALLOCATION_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/base_isolate.h" 9 #include "vm/base_isolate.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 public: 90 public:
91 ZoneAllocated() { } 91 ZoneAllocated() { }
92 92
93 // Implicitly allocate the object in the current zone. 93 // Implicitly allocate the object in the current zone.
94 void* operator new(uword size); 94 void* operator new(uword size);
95 95
96 // Implicitly allocate the object in the current zone given the current 96 // Implicitly allocate the object in the current zone given the current
97 // isolate. 97 // isolate.
98 void* operator new(uword size, BaseIsolate* isolate); 98 void* operator new(uword size, BaseIsolate* isolate);
99 99
100 // Allocate the object in the given zone, which must be the current zone.
101 void* operator new(uword size, Zone* zone);
102
100 // Ideally, the delete operator should be protected instead of 103 // Ideally, the delete operator should be protected instead of
101 // public, but unfortunately the compiler sometimes synthesizes 104 // public, but unfortunately the compiler sometimes synthesizes
102 // (unused) destructors for classes derived from ZoneObject, which 105 // (unused) destructors for classes derived from ZoneObject, which
103 // require the operator to be visible. MSVC requires the delete 106 // require the operator to be visible. MSVC requires the delete
104 // operator to be public. 107 // operator to be public.
105 108
106 // Disallow explicit deallocation of nodes. Nodes can only be 109 // Disallow explicit deallocation of nodes. Nodes can only be
107 // deallocated by invoking DeleteAll() on the zone they live in. 110 // deallocated by invoking DeleteAll() on the zone they live in.
108 void operator delete(void* pointer) { UNREACHABLE(); } 111 void operator delete(void* pointer) { UNREACHABLE(); }
109 112
110 private: 113 private:
111 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated); 114 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated);
112 }; 115 };
113 116
114 } // namespace dart 117 } // namespace dart
115 118
116 #endif // VM_ALLOCATION_H_ 119 #endif // VM_ALLOCATION_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/allocation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698