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

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

Issue 10905251: Lazy peer API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 years, 3 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_HEAP_H_ 5 #ifndef VM_HEAP_H_
6 #define VM_HEAP_H_ 6 #define VM_HEAP_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Returns the [lowest, highest) addresses in the heap. 149 // Returns the [lowest, highest) addresses in the heap.
150 void StartEndAddress(uword* start, uword* end) const; 150 void StartEndAddress(uword* start, uword* end) const;
151 151
152 ObjectSet* CreateAllocatedObjectSet() const; 152 ObjectSet* CreateAllocatedObjectSet() const;
153 153
154 // Generates a profile of the current and VM isolate heaps. 154 // Generates a profile of the current and VM isolate heaps.
155 void Profile(Dart_HeapProfileWriteCallback callback, void* stream) const; 155 void Profile(Dart_HeapProfileWriteCallback callback, void* stream) const;
156 156
157 static const char* GCReasonToString(GCReason gc_reason); 157 static const char* GCReasonToString(GCReason gc_reason);
158 158
159 // Associates a peer with an object. If an object has a peer, it is
160 // replaced. A value of NULL disassociate an object from its peer.
161 void SetPeer(RawObject* raw_obj, void* peer);
162
163 // Retrieves the peer associated with an object. Returns NULL if
164 // there is no association.
165 void* GetPeer(RawObject* raw_obj);
166
167 // Returns the number of objects with a peer.
168 int64_t PeerCount() const;
169
159 private: 170 private:
160 Heap(); 171 Heap();
161 172
162 uword AllocateNew(intptr_t size); 173 uword AllocateNew(intptr_t size);
163 uword AllocateOld(intptr_t size); 174 uword AllocateOld(intptr_t size);
164 uword AllocateCode(PageSpace* space, intptr_t size); 175 uword AllocateCode(PageSpace* space, intptr_t size);
165 176
166 // The different spaces used for allocation. 177 // The different spaces used for allocation.
167 Scavenger* new_space_; 178 Scavenger* new_space_;
168 PageSpace* old_space_; 179 PageSpace* old_space_;
(...skipping 20 matching lines...) Expand all
189 public: 200 public:
190 NoGCScope() {} 201 NoGCScope() {}
191 private: 202 private:
192 DISALLOW_COPY_AND_ASSIGN(NoGCScope); 203 DISALLOW_COPY_AND_ASSIGN(NoGCScope);
193 }; 204 };
194 #endif // defined(DEBUG) 205 #endif // defined(DEBUG)
195 206
196 } // namespace dart 207 } // namespace dart
197 208
198 #endif // VM_HEAP_H_ 209 #endif // VM_HEAP_H_
OLDNEW
« runtime/vm/dart_api_impl.cc ('K') | « runtime/vm/gc_marker.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698