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

Side by Side Diff: src/heap.h

Issue 6970004: Introduce lazy sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 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
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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 inline bool OldGenerationPromotionLimitReached() { 1169 inline bool OldGenerationPromotionLimitReached() {
1170 return (PromotedSpaceSize() + PromotedExternalMemorySize()) 1170 return (PromotedSpaceSize() + PromotedExternalMemorySize())
1171 > old_gen_promotion_limit_; 1171 > old_gen_promotion_limit_;
1172 } 1172 }
1173 1173
1174 inline intptr_t OldGenerationSpaceAvailable() { 1174 inline intptr_t OldGenerationSpaceAvailable() {
1175 return old_gen_allocation_limit_ - 1175 return old_gen_allocation_limit_ -
1176 (PromotedSpaceSize() + PromotedExternalMemorySize()); 1176 (PromotedSpaceSize() + PromotedExternalMemorySize());
1177 } 1177 }
1178 1178
1179 inline void LowerOldGenLimits(int bytes) {
1180 old_gen_promotion_limit_ -= bytes;
1181 old_gen_allocation_limit_ -= bytes;
1182 }
1183
1179 // Can be called when the embedding application is idle. 1184 // Can be called when the embedding application is idle.
1180 bool IdleNotification(); 1185 bool IdleNotification();
1181 1186
1182 // Declare all the root indices. 1187 // Declare all the root indices.
1183 enum RootListIndex { 1188 enum RootListIndex {
1184 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, 1189 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
1185 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION) 1190 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION)
1186 #undef ROOT_INDEX_DECLARATION 1191 #undef ROOT_INDEX_DECLARATION
1187 1192
1188 // Utility type maps 1193 // Utility type maps
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2333 2338
2334 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2339 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2335 }; 2340 };
2336 #endif // DEBUG || LIVE_OBJECT_LIST 2341 #endif // DEBUG || LIVE_OBJECT_LIST
2337 2342
2338 } } // namespace v8::internal 2343 } } // namespace v8::internal
2339 2344
2340 #undef HEAP 2345 #undef HEAP
2341 2346
2342 #endif // V8_HEAP_H_ 2347 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap.cc » ('j') | src/incremental-marking.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698