Skip to content

Commit f67a0d2

Browse files
authored
Make EDGES_WORK_BUFFER_SIZE constant public to bindings (#1291)
1 parent 0b3ec9b commit f67a0d2

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/plan/tracing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! This module contains code useful for tracing,
22
//! i.e. visiting the reachable objects by traversing all or part of an object graph.
33
4-
use crate::scheduler::gc_work::{ProcessEdgesWork, SlotOf, EDGES_WORK_BUFFER_SIZE};
5-
use crate::scheduler::{GCWorker, WorkBucketStage};
4+
use crate::scheduler::gc_work::{ProcessEdgesWork, SlotOf};
5+
use crate::scheduler::{GCWorker, WorkBucketStage, EDGES_WORK_BUFFER_SIZE};
66
use crate::util::ObjectReference;
77
use crate::vm::SlotVisitor;
88

src/scheduler/gc_work.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ use crate::*;
1010
use std::marker::PhantomData;
1111
use std::ops::{Deref, DerefMut};
1212

13-
/// Buffer size for [`ProcessEdgesWork`] work packets. This constant is exposed to binding
14-
/// developers so that they can use this value for places in their binding that interface with the
15-
/// work packet system, specifically the transitive closure via `ProcessEdgesWork` work packets
16-
/// such as roots gathering code or weak reference processing. In order to have better load
17-
/// balancing, it is recommended that binding developers use this constant to split work up into
18-
/// different work packets.
19-
pub const EDGES_WORK_BUFFER_SIZE: usize = 4096;
20-
2113
pub struct ScheduleCollection;
2214

2315
impl<VM: VMBinding> GCWork<VM> for ScheduleCollection {

src/scheduler/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
//! A general scheduler implementation. MMTk uses it to schedule GC-related work.
22
3+
/// Buffer size for [`ProcessEdgesWork`] work packets. This constant is exposed to binding
4+
/// developers so that they can use this value for places in their binding that interface with the
5+
/// work packet system, specifically the transitive closure via `ProcessEdgesWork` work packets
6+
/// such as roots gathering code or weak reference processing. In order to have better load
7+
/// balancing, it is recommended that binding developers use this constant to split work up into
8+
/// different work packets.
9+
pub const EDGES_WORK_BUFFER_SIZE: usize = 4096;
10+
311
pub(crate) mod affinity;
412

513
#[allow(clippy::module_inception)]

0 commit comments

Comments
 (0)