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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1036 | 1036 |
1037 // Performs garbage collection operation. | 1037 // Performs garbage collection operation. |
1038 // Returns whether there is a chance that another major GC could | 1038 // Returns whether there is a chance that another major GC could |
1039 // collect more garbage. | 1039 // collect more garbage. |
1040 inline bool CollectGarbage(AllocationSpace space, | 1040 inline bool CollectGarbage(AllocationSpace space, |
1041 const char* gc_reason = NULL); | 1041 const char* gc_reason = NULL); |
1042 | 1042 |
1043 static const int kNoGCFlags = 0; | 1043 static const int kNoGCFlags = 0; |
1044 static const int kMakeHeapIterableMask = 1; | 1044 static const int kMakeHeapIterableMask = 1; |
1045 static const int kReduceMemoryFootprintMask = 2; | 1045 static const int kReduceMemoryFootprintMask = 2; |
1046 static const int kAbortIncrementalMarkingMask = 4; | |
ulan
2012/03/07 17:22:26
Consider these flags:
static const int kSweepPreci
Michael Starzinger
2012/03/07 17:50:38
Done.
| |
1046 | 1047 |
1047 // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is | 1048 // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is |
1048 // non-zero, then the slower precise sweeper is used, which leaves the heap | 1049 // non-zero, then the slower precise sweeper is used, which leaves the heap |
1049 // in a state where we can iterate over the heap visiting all objects. | 1050 // in a state where we can iterate over the heap visiting all objects. |
1050 void CollectAllGarbage(int flags, const char* gc_reason = NULL); | 1051 void CollectAllGarbage(int flags, const char* gc_reason = NULL); |
1051 | 1052 |
1052 // Last hope GC, should try to squeeze as much as possible. | 1053 // Last hope GC, should try to squeeze as much as possible. |
1053 void CollectAllAvailableGarbage(const char* gc_reason = NULL); | 1054 void CollectAllAvailableGarbage(const char* gc_reason = NULL); |
1054 | 1055 |
1055 // Check whether the heap is currently iterable. | 1056 // Check whether the heap is currently iterable. |
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2665 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2666 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
2666 | 2667 |
2667 private: | 2668 private: |
2668 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2669 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2669 }; | 2670 }; |
2670 #endif // DEBUG || LIVE_OBJECT_LIST | 2671 #endif // DEBUG || LIVE_OBJECT_LIST |
2671 | 2672 |
2672 } } // namespace v8::internal | 2673 } } // namespace v8::internal |
2673 | 2674 |
2674 #endif // V8_HEAP_H_ | 2675 #endif // V8_HEAP_H_ |
OLD | NEW |