| OLD | NEW |
| 1 // Copyright 2006-2008 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // Delete all objects and free all memory allocated in the Zone. | 66 // Delete all objects and free all memory allocated in the Zone. |
| 67 void DeleteAll(); | 67 void DeleteAll(); |
| 68 | 68 |
| 69 // Returns true if more memory has been allocated in zones than | 69 // Returns true if more memory has been allocated in zones than |
| 70 // the limit allows. | 70 // the limit allows. |
| 71 inline bool excess_allocation(); | 71 inline bool excess_allocation(); |
| 72 | 72 |
| 73 inline void adjust_segment_bytes_allocated(int delta); | 73 inline void adjust_segment_bytes_allocated(int delta); |
| 74 | 74 |
| 75 static unsigned allocation_size_; |
| 76 |
| 75 private: | 77 private: |
| 76 friend class Isolate; | 78 friend class Isolate; |
| 77 friend class ZoneScope; | 79 friend class ZoneScope; |
| 78 | 80 |
| 79 // All pointers returned from New() have this alignment. | 81 // All pointers returned from New() have this alignment. |
| 80 static const int kAlignment = kPointerSize; | 82 static const int kAlignment = kPointerSize; |
| 81 | 83 |
| 82 // Never allocate segments smaller than this size in bytes. | 84 // Never allocate segments smaller than this size in bytes. |
| 83 static const int kMinimumSegmentSize = 8 * KB; | 85 static const int kMinimumSegmentSize = 8 * KB; |
| 84 | 86 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 public: | 226 public: |
| 225 ZoneSplayTree() | 227 ZoneSplayTree() |
| 226 : SplayTree<Config, ZoneListAllocationPolicy>() {} | 228 : SplayTree<Config, ZoneListAllocationPolicy>() {} |
| 227 ~ZoneSplayTree(); | 229 ~ZoneSplayTree(); |
| 228 }; | 230 }; |
| 229 | 231 |
| 230 | 232 |
| 231 } } // namespace v8::internal | 233 } } // namespace v8::internal |
| 232 | 234 |
| 233 #endif // V8_ZONE_H_ | 235 #endif // V8_ZONE_H_ |
| OLD | NEW |