| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1335   // True if we have reached the allocation limit in the old generation that | 1335   // True if we have reached the allocation limit in the old generation that | 
| 1336   // should force the next GC (caused normally) to be a full one. | 1336   // should force the next GC (caused normally) to be a full one. | 
| 1337   inline bool OldGenerationPromotionLimitReached() { | 1337   inline bool OldGenerationPromotionLimitReached() { | 
| 1338     return PromotedTotalSize() > old_gen_promotion_limit_; | 1338     return PromotedTotalSize() > old_gen_promotion_limit_; | 
| 1339   } | 1339   } | 
| 1340 | 1340 | 
| 1341   inline intptr_t OldGenerationSpaceAvailable() { | 1341   inline intptr_t OldGenerationSpaceAvailable() { | 
| 1342     return old_gen_allocation_limit_ - PromotedTotalSize(); | 1342     return old_gen_allocation_limit_ - PromotedTotalSize(); | 
| 1343   } | 1343   } | 
| 1344 | 1344 | 
|  | 1345   inline intptr_t OldGenerationCapacityAvailable() { | 
|  | 1346     return max_old_generation_size_ - PromotedTotalSize(); | 
|  | 1347   } | 
|  | 1348 | 
| 1345   static const intptr_t kMinimumPromotionLimit = 5 * Page::kPageSize; | 1349   static const intptr_t kMinimumPromotionLimit = 5 * Page::kPageSize; | 
| 1346   static const intptr_t kMinimumAllocationLimit = | 1350   static const intptr_t kMinimumAllocationLimit = | 
| 1347       8 * (Page::kPageSize > MB ? Page::kPageSize : MB); | 1351       8 * (Page::kPageSize > MB ? Page::kPageSize : MB); | 
| 1348 | 1352 | 
| 1349   // When we sweep lazily we initially guess that there is no garbage on the | 1353   // When we sweep lazily we initially guess that there is no garbage on the | 
| 1350   // heap and set the limits for the next GC accordingly.  As we sweep we find | 1354   // heap and set the limits for the next GC accordingly.  As we sweep we find | 
| 1351   // out that some of the pages contained garbage and we have to adjust | 1355   // out that some of the pages contained garbage and we have to adjust | 
| 1352   // downwards the size of the heap.  This means the limits that control the | 1356   // downwards the size of the heap.  This means the limits that control the | 
| 1353   // timing of the next GC also need to be adjusted downwards. | 1357   // timing of the next GC also need to be adjusted downwards. | 
| 1354   void LowerOldGenLimits(intptr_t adjustment) { | 1358   void LowerOldGenLimits(intptr_t adjustment) { | 
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2661   AssertNoAllocation no_alloc;  // i.e. no gc allowed. | 2665   AssertNoAllocation no_alloc;  // i.e. no gc allowed. | 
| 2662 | 2666 | 
| 2663  private: | 2667  private: | 
| 2664   DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2668   DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 
| 2665 }; | 2669 }; | 
| 2666 #endif  // DEBUG || LIVE_OBJECT_LIST | 2670 #endif  // DEBUG || LIVE_OBJECT_LIST | 
| 2667 | 2671 | 
| 2668 } }  // namespace v8::internal | 2672 } }  // namespace v8::internal | 
| 2669 | 2673 | 
| 2670 #endif  // V8_HEAP_H_ | 2674 #endif  // V8_HEAP_H_ | 
| OLD | NEW | 
|---|