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

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

Issue 1284263002: Start TimelineAnalysis utility (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // responsible for avoiding integer overflow yourself. 42 // responsible for avoiding integer overflow yourself.
43 inline uword AllocUnsafe(intptr_t size); 43 inline uword AllocUnsafe(intptr_t size);
44 44
45 45
46 // Make a copy of the string in the zone allocated area. 46 // Make a copy of the string in the zone allocated area.
47 char* MakeCopyOfString(const char* str); 47 char* MakeCopyOfString(const char* str);
48 48
49 // Make a zone-allocated string based on printf format and args. 49 // Make a zone-allocated string based on printf format and args.
50 char* PrintToString(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); 50 char* PrintToString(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
51 51
52 char* VPrint(const char* format, va_list args);
53
52 // Compute the total size of this zone. This includes wasted space that is 54 // Compute the total size of this zone. This includes wasted space that is
53 // due to internal fragmentation in the segments. 55 // due to internal fragmentation in the segments.
54 intptr_t SizeInBytes() const; 56 intptr_t SizeInBytes() const;
55 57
56 // Structure for managing handles allocation. 58 // Structure for managing handles allocation.
57 VMHandles* handles() { return &handles_; } 59 VMHandles* handles() { return &handles_; }
58 60
59 void VisitObjectPointers(ObjectPointerVisitor* visitor); 61 void VisitObjectPointers(ObjectPointerVisitor* visitor);
60 62
61 private: 63 private:
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 memmove(reinterpret_cast<void*>(new_data), 293 memmove(reinterpret_cast<void*>(new_data),
292 reinterpret_cast<void*>(old_data), 294 reinterpret_cast<void*>(old_data),
293 old_len * kElementSize); 295 old_len * kElementSize);
294 } 296 }
295 return new_data; 297 return new_data;
296 } 298 }
297 299
298 } // namespace dart 300 } // namespace dart
299 301
300 #endif // VM_ZONE_H_ 302 #endif // VM_ZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698