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

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

Issue 2360963005: Relax zone allocation assertion (Closed)
Patch Set: fschneider pre-review Created 4 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
« no previous file with comments | « runtime/vm/thread.cc ('k') | no next file » | 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_ZONE_H_ 5 #ifndef VM_ZONE_H_
6 #define VM_ZONE_H_ 6 #define VM_ZONE_H_
7 7
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/handles.h" 10 #include "vm/handles.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Compute the total size of this zone. This includes wasted space that is 64 // Compute the total size of this zone. This includes wasted space that is
65 // due to internal fragmentation in the segments. 65 // due to internal fragmentation in the segments.
66 intptr_t SizeInBytes() const; 66 intptr_t SizeInBytes() const;
67 67
68 // Structure for managing handles allocation. 68 // Structure for managing handles allocation.
69 VMHandles* handles() { return &handles_; } 69 VMHandles* handles() { return &handles_; }
70 70
71 void VisitObjectPointers(ObjectPointerVisitor* visitor); 71 void VisitObjectPointers(ObjectPointerVisitor* visitor);
72 72
73 Zone* previous() const { return previous_; }
74
73 private: 75 private:
74 Zone(); 76 Zone();
75 ~Zone(); // Delete all memory associated with the zone. 77 ~Zone(); // Delete all memory associated with the zone.
76 78
77 // All pointers returned from AllocateUnsafe() and New() have this alignment. 79 // All pointers returned from AllocateUnsafe() and New() have this alignment.
78 static const intptr_t kAlignment = kDoubleSize; 80 static const intptr_t kAlignment = kDoubleSize;
79 81
80 // Default initial chunk size. 82 // Default initial chunk size.
81 static const intptr_t kInitialChunkSize = 1 * KB; 83 static const intptr_t kInitialChunkSize = 1 * KB;
82 84
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 memmove(reinterpret_cast<void*>(new_data), 253 memmove(reinterpret_cast<void*>(new_data),
252 reinterpret_cast<void*>(old_data), 254 reinterpret_cast<void*>(old_data),
253 old_len * kElementSize); 255 old_len * kElementSize);
254 } 256 }
255 return new_data; 257 return new_data;
256 } 258 }
257 259
258 } // namespace dart 260 } // namespace dart
259 261
260 #endif // VM_ZONE_H_ 262 #endif // VM_ZONE_H_
OLDNEW
« no previous file with comments | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698