| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 static inline void adjust_segment_bytes_allocated(int delta); | 68 static inline void adjust_segment_bytes_allocated(int delta); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 | 71 |
| 72 // All pointers returned from New() have this alignment. | 72 // All pointers returned from New() have this alignment. |
| 73 static const int kAlignment = kPointerSize; | 73 static const int kAlignment = kPointerSize; |
| 74 | 74 |
| 75 // Never allocate segments smaller than this size in bytes. | 75 // Never allocate segments smaller than this size in bytes. |
| 76 static const int kMinimumSegmentSize = 8 * KB; | 76 static const int kMinimumSegmentSize = 8 * KB; |
| 77 |
| 78 // Never allocate segments larger than this size in bytes. |
| 79 static const int kMaximumSegmentSize = 1 * MB; |
| 77 | 80 |
| 78 // Never keep segments larger than this size in bytes around. | 81 // Never keep segments larger than this size in bytes around. |
| 79 static const int kMaximumKeptSegmentSize = 64 * KB; | 82 static const int kMaximumKeptSegmentSize = 64 * KB; |
| 80 | 83 |
| 81 // Report zone excess when allocation exceeds this limit. | 84 // Report zone excess when allocation exceeds this limit. |
| 82 static int zone_excess_limit_; | 85 static int zone_excess_limit_; |
| 83 | 86 |
| 84 // The number of bytes allocated in segments. Note that this number | 87 // The number of bytes allocated in segments. Note that this number |
| 85 // includes memory allocated from the OS but not yet allocated from | 88 // includes memory allocated from the OS but not yet allocated from |
| 86 // the zone. | 89 // the zone. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 191 |
| 189 private: | 192 private: |
| 190 ZoneScopeMode mode_; | 193 ZoneScopeMode mode_; |
| 191 static int nesting_; | 194 static int nesting_; |
| 192 }; | 195 }; |
| 193 | 196 |
| 194 | 197 |
| 195 } } // namespace v8::internal | 198 } } // namespace v8::internal |
| 196 | 199 |
| 197 #endif // V8_ZONE_H_ | 200 #endif // V8_ZONE_H_ |
| OLD | NEW |