Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
dart-lang
sdk
runtime
vm
heap
sweeper.h
Go to the documentation of this file.
1
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2
// for details. All rights reserved. Use of this source code is governed by a
3
// BSD-style license that can be found in the LICENSE file.
4
5
#ifndef RUNTIME_VM_HEAP_SWEEPER_H_
6
#define RUNTIME_VM_HEAP_SWEEPER_H_
7
8
#include "
vm/globals.h
"
9
10
namespace
dart
{
11
12
// Forward declarations.
13
class
FreeList;
14
class
Heap;
15
class
Page;
16
class
IsolateGroup;
17
class
PageSpace;
18
19
// The class GCSweeper is used to visit the heap after marking to reclaim unused
20
// memory.
21
class
GCSweeper
{
22
public
:
23
GCSweeper
() {}
24
~GCSweeper
() {}
25
26
// Sweep the memory area for the page while clearing the mark bits and adding
27
// all the unmarked objects to the freelist. Whether the freelist is
28
// pre-locked is indicated by the locked parameter.
29
// Returns true if the page is in use. Freelist is untouched if page is not
30
// in use.
31
bool
SweepPage
(
Page
* page,
FreeList
* freelist);
32
33
// Returns the number of words from page->object_start() to the end of the
34
// last marked object.
35
intptr_t
SweepLargePage
(
Page
* page);
36
37
intptr_t
SweepNewPage
(
Page
* page);
38
39
// Sweep the large and regular sized data pages.
40
static
void
SweepConcurrent
(
IsolateGroup
* isolate_group);
41
};
42
43
}
// namespace dart
44
45
#endif
// RUNTIME_VM_HEAP_SWEEPER_H_
dart::FreeList
Definition
freelist.h:79
dart::GCSweeper
Definition
sweeper.h:21
dart::GCSweeper::GCSweeper
GCSweeper()
Definition
sweeper.h:23
dart::GCSweeper::SweepPage
bool SweepPage(Page *page, FreeList *freelist)
Definition
sweeper.cc:60
dart::GCSweeper::SweepConcurrent
static void SweepConcurrent(IsolateGroup *isolate_group)
Definition
sweeper.cc:213
dart::GCSweeper::SweepNewPage
intptr_t SweepNewPage(Page *page)
Definition
sweeper.cc:18
dart::GCSweeper::~GCSweeper
~GCSweeper()
Definition
sweeper.h:24
dart::GCSweeper::SweepLargePage
intptr_t SweepLargePage(Page *page)
Definition
sweeper.cc:137
dart::IsolateGroup
Definition
isolate.h:267
dart::Page
Definition
page.h:61
dart
Definition
dart_vm.cc:33
globals.h
Generated on Fri Apr 26 2024 06:15:08 for Flutter Engine by
1.9.8