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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 434 |
435 void AddEvacuationCandidate(Page* p); | 435 void AddEvacuationCandidate(Page* p); |
436 | 436 |
437 // Prepares for GC by resetting relocation info in old and map spaces and | 437 // Prepares for GC by resetting relocation info in old and map spaces and |
438 // choosing spaces to compact. | 438 // choosing spaces to compact. |
439 void Prepare(GCTracer* tracer); | 439 void Prepare(GCTracer* tracer); |
440 | 440 |
441 // Performs a global garbage collection. | 441 // Performs a global garbage collection. |
442 void CollectGarbage(); | 442 void CollectGarbage(); |
443 | 443 |
444 bool StartCompaction(); | 444 bool StartCompaction(bool incremental); |
445 | 445 |
446 void AbortCompaction(); | 446 void AbortCompaction(); |
447 | 447 |
448 // During a full GC, there is a stack-allocated GCTracer that is used for | 448 // During a full GC, there is a stack-allocated GCTracer that is used for |
449 // bookkeeping information. Return a pointer to that tracer. | 449 // bookkeeping information. Return a pointer to that tracer. |
450 GCTracer* tracer() { return tracer_; } | 450 GCTracer* tracer() { return tracer_; } |
451 | 451 |
452 #ifdef DEBUG | 452 #ifdef DEBUG |
453 // Checks whether performing mark-compact collection. | 453 // Checks whether performing mark-compact collection. |
454 bool in_use() { return state_ > PREPARE_GC; } | 454 bool in_use() { return state_ > PREPARE_GC; } |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 | 761 |
762 friend class Heap; | 762 friend class Heap; |
763 }; | 763 }; |
764 | 764 |
765 | 765 |
766 const char* AllocationSpaceName(AllocationSpace space); | 766 const char* AllocationSpaceName(AllocationSpace space); |
767 | 767 |
768 } } // namespace v8::internal | 768 } } // namespace v8::internal |
769 | 769 |
770 #endif // V8_MARK_COMPACT_H_ | 770 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |