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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // Delete all objects and free all memory allocated in the Zone. | 68 // Delete all objects and free all memory allocated in the Zone. |
69 void DeleteAll(); | 69 void DeleteAll(); |
70 | 70 |
71 // Returns true if more memory has been allocated in zones than | 71 // Returns true if more memory has been allocated in zones than |
72 // the limit allows. | 72 // the limit allows. |
73 inline bool excess_allocation(); | 73 inline bool excess_allocation(); |
74 | 74 |
75 inline void adjust_segment_bytes_allocated(int delta); | 75 inline void adjust_segment_bytes_allocated(int delta); |
76 | 76 |
| 77 inline Isolate* isolate() { return isolate_; } |
| 78 |
77 static unsigned allocation_size_; | 79 static unsigned allocation_size_; |
78 | 80 |
79 private: | 81 private: |
80 friend class Isolate; | 82 friend class Isolate; |
81 friend class ZoneScope; | 83 friend class ZoneScope; |
82 | 84 |
83 // All pointers returned from New() have this alignment. | 85 // All pointers returned from New() have this alignment. |
84 static const int kAlignment = kPointerSize; | 86 static const int kAlignment = kPointerSize; |
85 | 87 |
86 // Never allocate segments smaller than this size in bytes. | 88 // Never allocate segments smaller than this size in bytes. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 public: | 233 public: |
232 ZoneSplayTree() | 234 ZoneSplayTree() |
233 : SplayTree<Config, ZoneListAllocationPolicy>() {} | 235 : SplayTree<Config, ZoneListAllocationPolicy>() {} |
234 ~ZoneSplayTree(); | 236 ~ZoneSplayTree(); |
235 }; | 237 }; |
236 | 238 |
237 | 239 |
238 } } // namespace v8::internal | 240 } } // namespace v8::internal |
239 | 241 |
240 #endif // V8_ZONE_H_ | 242 #endif // V8_ZONE_H_ |
OLD | NEW |