Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1348)

Side by Side Diff: src/heap.h

Issue 7834019: Up the initial promotion limit to 5 pages, since the old space has a minimum (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698