| 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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 inline bool OldGenerationPromotionLimitReached() { | 1214 inline bool OldGenerationPromotionLimitReached() { |
| 1215 return (PromotedSpaceSize() + PromotedExternalMemorySize()) | 1215 return (PromotedSpaceSize() + PromotedExternalMemorySize()) |
| 1216 > old_gen_promotion_limit_; | 1216 > old_gen_promotion_limit_; |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 inline intptr_t OldGenerationSpaceAvailable() { | 1219 inline intptr_t OldGenerationSpaceAvailable() { |
| 1220 return old_gen_allocation_limit_ - | 1220 return old_gen_allocation_limit_ - |
| 1221 (PromotedSpaceSize() + PromotedExternalMemorySize()); | 1221 (PromotedSpaceSize() + PromotedExternalMemorySize()); |
| 1222 } | 1222 } |
| 1223 | 1223 |
| 1224 static const intptr_t kMinimumPromotionLimit = | 1224 static const intptr_t kMinimumPromotionLimit = 5 * Page::kPageSize; |
| 1225 2 * (Page::kPageSize > MB ? Page::kPageSize : MB); | |
| 1226 static const intptr_t kMinimumAllocationLimit = | 1225 static const intptr_t kMinimumAllocationLimit = |
| 1227 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); | 1226 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); |
| 1228 | 1227 |
| 1229 // When we sweep lazily we initially guess that there is no garbage on the | 1228 // When we sweep lazily we initially guess that there is no garbage on the |
| 1230 // heap and set the limits for the next GC accordingly. As we sweep we find | 1229 // heap and set the limits for the next GC accordingly. As we sweep we find |
| 1231 // out that some of the pages contained garbage and we have to adjust | 1230 // out that some of the pages contained garbage and we have to adjust |
| 1232 // downwards the size of the heap. This means the limits that control the | 1231 // downwards the size of the heap. This means the limits that control the |
| 1233 // timing of the next GC also need to be adjusted downwards. | 1232 // timing of the next GC also need to be adjusted downwards. |
| 1234 void LowerOldGenLimits(intptr_t adjustment) { | 1233 void LowerOldGenLimits(intptr_t adjustment) { |
| 1235 size_of_old_gen_at_last_old_space_gc_ -= adjustment; | 1234 size_of_old_gen_at_last_old_space_gc_ -= adjustment; |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2446 | 2445 |
| 2447 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2446 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2448 }; | 2447 }; |
| 2449 #endif // DEBUG || LIVE_OBJECT_LIST | 2448 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2450 | 2449 |
| 2451 } } // namespace v8::internal | 2450 } } // namespace v8::internal |
| 2452 | 2451 |
| 2453 #undef HEAP | 2452 #undef HEAP |
| 2454 | 2453 |
| 2455 #endif // V8_HEAP_H_ | 2454 #endif // V8_HEAP_H_ |
| OLD | NEW |