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

Side by Side Diff: src/heap/incremental-marking.h

Issue 2689683002: [heap] Fix address space leak in Unmapper (Closed)
Patch Set: Windows compile fixes Created 3 years, 10 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
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_
6 #define V8_HEAP_INCREMENTAL_MARKING_H_ 6 #define V8_HEAP_INCREMENTAL_MARKING_H_
7 7
8 #include "src/cancelable-task.h" 8 #include "src/cancelable-task.h"
9 #include "src/execution.h" 9 #include "src/execution.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
11 #include "src/heap/incremental-marking-job.h" 11 #include "src/heap/incremental-marking-job.h"
12 #include "src/heap/mark-compact.h" 12 #include "src/heap/mark-compact.h"
13 #include "src/heap/spaces.h" 13 #include "src/heap/spaces.h"
14 #include "src/objects.h" 14 #include "src/objects.h"
15 15
16 namespace v8 { 16 namespace v8 {
17 namespace internal { 17 namespace internal {
18 18
19 // Forward declarations. 19 // Forward declarations.
20 class MarkBit; 20 class MarkBit;
21 class PagedSpace; 21 class PagedSpace;
22 22
23 enum class StepOrigin { kV8, kTask }; 23 enum class StepOrigin { kV8, kTask };
24 24
25 class IncrementalMarking { 25 class V8_EXPORT_PRIVATE IncrementalMarking {
26 public: 26 public:
27 enum State { STOPPED, SWEEPING, MARKING, COMPLETE }; 27 enum State { STOPPED, SWEEPING, MARKING, COMPLETE };
28 28
29 enum CompletionAction { GC_VIA_STACK_GUARD, NO_GC_VIA_STACK_GUARD }; 29 enum CompletionAction { GC_VIA_STACK_GUARD, NO_GC_VIA_STACK_GUARD };
30 30
31 enum ForceCompletionAction { FORCE_COMPLETION, DO_NOT_FORCE_COMPLETION }; 31 enum ForceCompletionAction { FORCE_COMPLETION, DO_NOT_FORCE_COMPLETION };
32 32
33 enum GCRequestType { NONE, COMPLETE_MARKING, FINALIZATION }; 33 enum GCRequestType { NONE, COMPLETE_MARKING, FINALIZATION };
34 34
35 explicit IncrementalMarking(Heap* heap); 35 explicit IncrementalMarking(Heap* heap);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // 144 //
145 // No slots in white objects should be recorded, as some slots are typed and 145 // No slots in white objects should be recorded, as some slots are typed and
146 // cannot be interpreted correctly if the underlying object does not survive 146 // cannot be interpreted correctly if the underlying object does not survive
147 // the incremental cycle (stays white). 147 // the incremental cycle (stays white).
148 INLINE(bool BaseRecordWrite(HeapObject* obj, Object* value)); 148 INLINE(bool BaseRecordWrite(HeapObject* obj, Object* value));
149 INLINE(void RecordWrite(HeapObject* obj, Object** slot, Object* value)); 149 INLINE(void RecordWrite(HeapObject* obj, Object** slot, Object* value));
150 INLINE(void RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* value)); 150 INLINE(void RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* value));
151 INLINE(void RecordWriteOfCodeEntry(JSFunction* host, Object** slot, 151 INLINE(void RecordWriteOfCodeEntry(JSFunction* host, Object** slot,
152 Code* value)); 152 Code* value));
153 153
154 V8_EXPORT_PRIVATE void RecordWriteSlow(HeapObject* obj, Object** slot, 154 void RecordWriteSlow(HeapObject* obj, Object** slot, Object* value);
155 Object* value);
156 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* value); 155 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* value);
157 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value); 156 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value);
158 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); 157 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value);
159 void RecordCodeTargetPatch(Address pc, HeapObject* value); 158 void RecordCodeTargetPatch(Address pc, HeapObject* value);
160 159
161 void WhiteToGreyAndPush(HeapObject* obj); 160 void WhiteToGreyAndPush(HeapObject* obj);
162 161
163 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { 162 inline void SetOldSpacePageFlags(MemoryChunk* chunk) {
164 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); 163 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting());
165 } 164 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 IncrementalMarkingJob incremental_marking_job_; 304 IncrementalMarkingJob incremental_marking_job_;
306 Observer new_generation_observer_; 305 Observer new_generation_observer_;
307 Observer old_generation_observer_; 306 Observer old_generation_observer_;
308 307
309 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 308 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
310 }; 309 };
311 } // namespace internal 310 } // namespace internal
312 } // namespace v8 311 } // namespace v8
313 312
314 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ 313 #endif // V8_HEAP_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698