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

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

Issue 259483002: Zero-sized new-space for VM isolate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | « runtime/vm/heap.cc ('k') | runtime/vm/scavenger.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) 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_SCAVENGER_H_ 5 #ifndef VM_SCAVENGER_H_
6 #define VM_SCAVENGER_H_ 6 #define VM_SCAVENGER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Accessors to generate code for inlined allocation. 72 // Accessors to generate code for inlined allocation.
73 uword* TopAddress() { return &top_; } 73 uword* TopAddress() { return &top_; }
74 uword* EndAddress() { return &end_; } 74 uword* EndAddress() { return &end_; }
75 static intptr_t top_offset() { return OFFSET_OF(Scavenger, top_); } 75 static intptr_t top_offset() { return OFFSET_OF(Scavenger, top_); }
76 static intptr_t end_offset() { return OFFSET_OF(Scavenger, end_); } 76 static intptr_t end_offset() { return OFFSET_OF(Scavenger, end_); }
77 77
78 intptr_t UsedInWords() const { 78 intptr_t UsedInWords() const {
79 return (top_ - FirstObjectStart()) >> kWordSizeLog2; 79 return (top_ - FirstObjectStart()) >> kWordSizeLog2;
80 } 80 }
81 intptr_t CapacityInWords() const { 81 intptr_t CapacityInWords() const {
82 return (end_ - FirstObjectStart()) >> kWordSizeLog2; 82 return to_->size() >> kWordSizeLog2;
83 } 83 }
84 intptr_t ExternalInWords() const { 84 intptr_t ExternalInWords() const {
85 return external_size_ >> kWordSizeLog2; 85 return external_size_ >> kWordSizeLog2;
86 } 86 }
87 SpaceUsage GetCurrentUsage() const { 87 SpaceUsage GetCurrentUsage() const {
88 SpaceUsage usage; 88 SpaceUsage usage;
89 usage.used_in_words = UsedInWords(); 89 usage.used_in_words = UsedInWords();
90 usage.capacity_in_words = CapacityInWords(); 90 usage.capacity_in_words = CapacityInWords();
91 usage.external_in_words = ExternalInWords(); 91 usage.external_in_words = ExternalInWords();
92 return usage; 92 return usage;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 friend class ScavengerVisitor; 216 friend class ScavengerVisitor;
217 friend class ScavengerWeakVisitor; 217 friend class ScavengerWeakVisitor;
218 218
219 DISALLOW_COPY_AND_ASSIGN(Scavenger); 219 DISALLOW_COPY_AND_ASSIGN(Scavenger);
220 }; 220 };
221 221
222 } // namespace dart 222 } // namespace dart
223 223
224 #endif // VM_SCAVENGER_H_ 224 #endif // VM_SCAVENGER_H_
OLDNEW
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698