| 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 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 scavenging_visitors_table_.GetVisitor(map)(map, slot, obj); | 1331 scavenging_visitors_table_.GetVisitor(map)(map, slot, obj); |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 private: | 1334 private: |
| 1335 Heap(); | 1335 Heap(); |
| 1336 | 1336 |
| 1337 // This can be calculated directly from a pointer to the heap; however, it is | 1337 // This can be calculated directly from a pointer to the heap; however, it is |
| 1338 // more expedient to get at the isolate directly from within Heap methods. | 1338 // more expedient to get at the isolate directly from within Heap methods. |
| 1339 Isolate* isolate_; | 1339 Isolate* isolate_; |
| 1340 | 1340 |
| 1341 intptr_t code_range_size_; |
| 1341 int reserved_semispace_size_; | 1342 int reserved_semispace_size_; |
| 1342 int max_semispace_size_; | 1343 int max_semispace_size_; |
| 1343 int initial_semispace_size_; | 1344 int initial_semispace_size_; |
| 1344 intptr_t max_old_generation_size_; | 1345 intptr_t max_old_generation_size_; |
| 1345 intptr_t max_executable_size_; | 1346 intptr_t max_executable_size_; |
| 1346 intptr_t code_range_size_; | |
| 1347 | 1347 |
| 1348 // For keeping track of how much data has survived | 1348 // For keeping track of how much data has survived |
| 1349 // scavenge since last new space expansion. | 1349 // scavenge since last new space expansion. |
| 1350 int survived_since_last_expansion_; | 1350 int survived_since_last_expansion_; |
| 1351 | 1351 |
| 1352 int always_allocate_scope_depth_; | 1352 int always_allocate_scope_depth_; |
| 1353 int linear_allocation_scope_depth_; | 1353 int linear_allocation_scope_depth_; |
| 1354 | 1354 |
| 1355 // For keeping track of context disposals. | 1355 // For keeping track of context disposals. |
| 1356 int contexts_disposed_; | 1356 int contexts_disposed_; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1501 | 1501 |
| 1502 // Checks whether a global GC is necessary | 1502 // Checks whether a global GC is necessary |
| 1503 GarbageCollector SelectGarbageCollector(AllocationSpace space); | 1503 GarbageCollector SelectGarbageCollector(AllocationSpace space); |
| 1504 | 1504 |
| 1505 // Performs garbage collection | 1505 // Performs garbage collection |
| 1506 // Returns whether there is a chance another major GC could | 1506 // Returns whether there is a chance another major GC could |
| 1507 // collect more garbage. | 1507 // collect more garbage. |
| 1508 bool PerformGarbageCollection(GarbageCollector collector, | 1508 bool PerformGarbageCollection(GarbageCollector collector, |
| 1509 GCTracer* tracer); | 1509 GCTracer* tracer); |
| 1510 | 1510 |
| 1511 static const intptr_t kMinimumPromotionLimit = 2 * MB; | |
| 1512 static const intptr_t kMinimumAllocationLimit = 8 * MB; | |
| 1513 | 1511 |
| 1514 inline void UpdateOldSpaceLimits(); | 1512 inline void UpdateOldSpaceLimits(); |
| 1515 | 1513 |
| 1516 | 1514 |
| 1517 // Allocate an uninitialized object in map space. The behavior is identical | 1515 // Allocate an uninitialized object in map space. The behavior is identical |
| 1518 // to Heap::AllocateRaw(size_in_bytes, MAP_SPACE), except that (a) it doesn't | 1516 // to Heap::AllocateRaw(size_in_bytes, MAP_SPACE), except that (a) it doesn't |
| 1519 // have to test the allocation space argument and (b) can reduce code size | 1517 // have to test the allocation space argument and (b) can reduce code size |
| 1520 // (since both AllocateRaw and AllocateRawMap are inlined). | 1518 // (since both AllocateRaw and AllocateRawMap are inlined). |
| 1521 MUST_USE_RESULT inline MaybeObject* AllocateRawMap(); | 1519 MUST_USE_RESULT inline MaybeObject* AllocateRawMap(); |
| 1522 | 1520 |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2356 | 2354 |
| 2357 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2355 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2358 }; | 2356 }; |
| 2359 #endif // DEBUG || LIVE_OBJECT_LIST | 2357 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2360 | 2358 |
| 2361 } } // namespace v8::internal | 2359 } } // namespace v8::internal |
| 2362 | 2360 |
| 2363 #undef HEAP | 2361 #undef HEAP |
| 2364 | 2362 |
| 2365 #endif // V8_HEAP_H_ | 2363 #endif // V8_HEAP_H_ |
| OLD | NEW |