Skip to content

Conversation

@k-sareen
Copy link
Collaborator

No description provided.

/// such as roots gathering code or weak reference processing. In order to have better load
/// balancing, it is recommended that binding developers use this constant to split work up into
/// different work packets.
pub const EDGES_WORK_BUFFER_SIZE: usize = 4096;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just re-export it. See the pub use below.

Copy link
Collaborator Author

@k-sareen k-sareen Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it'd be better to actually have all constants together in mod.rs like we do for many other cases like in immix/mod.rs for example.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title suggested that you just wanted to make the constant public to bindings. I was suggesting pub use is the straightforward way to achieve that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. But I thought it made sense to move the constant so that if we ever have other scheduler constants, they are not scattered around the different files. Up to you. I can move it back and re-export

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks okay. I think the difference is insigifnicant whether we put the constants in the top-level modules or lower-level submodules. There is no convention to require either way so it is your choice.

@k-sareen k-sareen added this pull request to the merge queue Mar 25, 2025
Merged via the queue into mmtk:master with commit f67a0d2 Mar 25, 2025
31 of 33 checks passed
@k-sareen k-sareen deleted the fix/wp-size-constant branch March 25, 2025 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants