| 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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 int get_min_in_mutator() { return min_in_mutator_; } | 1221 int get_min_in_mutator() { return min_in_mutator_; } |
| 1222 | 1222 |
| 1223 MarkCompactCollector* mark_compact_collector() { | 1223 MarkCompactCollector* mark_compact_collector() { |
| 1224 return &mark_compact_collector_; | 1224 return &mark_compact_collector_; |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 ExternalStringTable* external_string_table() { | 1227 ExternalStringTable* external_string_table() { |
| 1228 return &external_string_table_; | 1228 return &external_string_table_; |
| 1229 } | 1229 } |
| 1230 | 1230 |
| 1231 // Returns the current sweep generation. |
| 1232 int sweep_generation() { |
| 1233 return sweep_generation_; |
| 1234 } |
| 1235 |
| 1231 inline Isolate* isolate(); | 1236 inline Isolate* isolate(); |
| 1232 bool is_safe_to_read_maps() { return is_safe_to_read_maps_; } | 1237 bool is_safe_to_read_maps() { return is_safe_to_read_maps_; } |
| 1233 | 1238 |
| 1234 void CallGlobalGCPrologueCallback() { | 1239 void CallGlobalGCPrologueCallback() { |
| 1235 if (global_gc_prologue_callback_ != NULL) global_gc_prologue_callback_(); | 1240 if (global_gc_prologue_callback_ != NULL) global_gc_prologue_callback_(); |
| 1236 } | 1241 } |
| 1237 | 1242 |
| 1238 void CallGlobalGCEpilogueCallback() { | 1243 void CallGlobalGCEpilogueCallback() { |
| 1239 if (global_gc_epilogue_callback_ != NULL) global_gc_epilogue_callback_(); | 1244 if (global_gc_epilogue_callback_ != NULL) global_gc_epilogue_callback_(); |
| 1240 } | 1245 } |
| 1241 | 1246 |
| 1242 private: | 1247 private: |
| 1243 Heap(); | 1248 Heap(); |
| 1244 | 1249 |
| 1245 // This can be calculated directly from a pointer to the heap; however, it is | 1250 // This can be calculated directly from a pointer to the heap; however, it is |
| 1246 // more expedient to get at the isolate directly from within Heap methods. | 1251 // more expedient to get at the isolate directly from within Heap methods. |
| 1247 Isolate* isolate_; | 1252 Isolate* isolate_; |
| 1248 | 1253 |
| 1249 int reserved_semispace_size_; | 1254 int reserved_semispace_size_; |
| 1250 int max_semispace_size_; | 1255 int max_semispace_size_; |
| 1251 int initial_semispace_size_; | 1256 int initial_semispace_size_; |
| 1252 intptr_t max_old_generation_size_; | 1257 intptr_t max_old_generation_size_; |
| 1253 intptr_t max_executable_size_; | 1258 intptr_t max_executable_size_; |
| 1254 intptr_t code_range_size_; | 1259 intptr_t code_range_size_; |
| 1255 | 1260 |
| 1256 // For keeping track of how much data has survived | 1261 // For keeping track of how much data has survived |
| 1257 // scavenge since last new space expansion. | 1262 // scavenge since last new space expansion. |
| 1258 int survived_since_last_expansion_; | 1263 int survived_since_last_expansion_; |
| 1259 | 1264 |
| 1265 // For keeping track on when to flush RegExp code. |
| 1266 int sweep_generation_; |
| 1267 |
| 1260 int always_allocate_scope_depth_; | 1268 int always_allocate_scope_depth_; |
| 1261 int linear_allocation_scope_depth_; | 1269 int linear_allocation_scope_depth_; |
| 1262 | 1270 |
| 1263 // For keeping track of context disposals. | 1271 // For keeping track of context disposals. |
| 1264 int contexts_disposed_; | 1272 int contexts_disposed_; |
| 1265 | 1273 |
| 1266 #if defined(V8_TARGET_ARCH_X64) | 1274 #if defined(V8_TARGET_ARCH_X64) |
| 1267 static const int kMaxObjectSizeInNewSpace = 1024*KB; | 1275 static const int kMaxObjectSizeInNewSpace = 1024*KB; |
| 1268 #else | 1276 #else |
| 1269 static const int kMaxObjectSizeInNewSpace = 512*KB; | 1277 static const int kMaxObjectSizeInNewSpace = 512*KB; |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2259 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2267 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2260 }; | 2268 }; |
| 2261 #endif // DEBUG || LIVE_OBJECT_LIST | 2269 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2262 | 2270 |
| 2263 | 2271 |
| 2264 } } // namespace v8::internal | 2272 } } // namespace v8::internal |
| 2265 | 2273 |
| 2266 #undef HEAP | 2274 #undef HEAP |
| 2267 | 2275 |
| 2268 #endif // V8_HEAP_H_ | 2276 #endif // V8_HEAP_H_ |
| OLD | NEW |