OLD | NEW |
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 private: | 55 private: |
56 explicit SemiSpace(VirtualMemory* reserved); | 56 explicit SemiSpace(VirtualMemory* reserved); |
57 ~SemiSpace(); | 57 ~SemiSpace(); |
58 | 58 |
59 VirtualMemory* reserved_; // NULL for an emtpy space. | 59 VirtualMemory* reserved_; // NULL for an emtpy space. |
60 MemoryRegion region_; | 60 MemoryRegion region_; |
61 | 61 |
62 static SemiSpace* cache_; | 62 static SemiSpace* cache_; |
63 static Mutex* mutex_; | 63 static Mutex* mutex_; |
64 | |
65 #ifdef DEBUG | |
66 static const intptr_t kZapValue = 0xf3; | |
67 #endif | |
68 }; | 64 }; |
69 | 65 |
70 | 66 |
71 // Statistics for a particular scavenge. | 67 // Statistics for a particular scavenge. |
72 class ScavengeStats { | 68 class ScavengeStats { |
73 public: | 69 public: |
74 ScavengeStats() {} | 70 ScavengeStats() {} |
75 ScavengeStats(int64_t start_micros, | 71 ScavengeStats(int64_t start_micros, |
76 int64_t end_micros, | 72 int64_t end_micros, |
77 SpaceUsage before, | 73 SpaceUsage before, |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 313 |
318 friend class ScavengerVisitor; | 314 friend class ScavengerVisitor; |
319 friend class ScavengerWeakVisitor; | 315 friend class ScavengerWeakVisitor; |
320 | 316 |
321 DISALLOW_COPY_AND_ASSIGN(Scavenger); | 317 DISALLOW_COPY_AND_ASSIGN(Scavenger); |
322 }; | 318 }; |
323 | 319 |
324 } // namespace dart | 320 } // namespace dart |
325 | 321 |
326 #endif // VM_SCAVENGER_H_ | 322 #endif // VM_SCAVENGER_H_ |
OLD | NEW |