OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 inline void adjust_segment_bytes_allocated(int delta); | 79 inline void adjust_segment_bytes_allocated(int delta); |
80 | 80 |
81 inline Isolate* isolate() { return isolate_; } | 81 inline Isolate* isolate() { return isolate_; } |
82 | 82 |
83 static unsigned allocation_size_; | 83 static unsigned allocation_size_; |
84 | 84 |
85 private: | 85 private: |
86 friend class Isolate; | 86 friend class Isolate; |
87 friend class ZoneScope; | 87 friend class ZoneScope; |
88 | 88 |
89 // All pointers returned from New() have this alignment. | 89 // All pointers returned from New() have this alignment. In addition, if the |
| 90 // object being allocated has a size that is divisible by 8 then its alignment |
| 91 // will be 8. |
90 static const int kAlignment = kPointerSize; | 92 static const int kAlignment = kPointerSize; |
91 | 93 |
92 // Never allocate segments smaller than this size in bytes. | 94 // Never allocate segments smaller than this size in bytes. |
93 static const int kMinimumSegmentSize = 8 * KB; | 95 static const int kMinimumSegmentSize = 8 * KB; |
94 | 96 |
95 // Never allocate segments larger than this size in bytes. | 97 // Never allocate segments larger than this size in bytes. |
96 static const int kMaximumSegmentSize = 1 * MB; | 98 static const int kMaximumSegmentSize = 1 * MB; |
97 | 99 |
98 // Never keep segments larger than this size in bytes around. | 100 // Never keep segments larger than this size in bytes around. |
99 static const int kMaximumKeptSegmentSize = 64 * KB; | 101 static const int kMaximumKeptSegmentSize = 64 * KB; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 public: | 239 public: |
238 ZoneSplayTree() | 240 ZoneSplayTree() |
239 : SplayTree<Config, ZoneListAllocationPolicy>() {} | 241 : SplayTree<Config, ZoneListAllocationPolicy>() {} |
240 ~ZoneSplayTree(); | 242 ~ZoneSplayTree(); |
241 }; | 243 }; |
242 | 244 |
243 | 245 |
244 } } // namespace v8::internal | 246 } } // namespace v8::internal |
245 | 247 |
246 #endif // V8_ZONE_H_ | 248 #endif // V8_ZONE_H_ |
OLD | NEW |