Skip to content

Commit

Permalink
Use MMTK Option env var support.
Browse files Browse the repository at this point in the history
This will enable us to configure a lot of the MMTK specific settings
(including the plan, the number of threads, and GC stress controls)
using MMTK_ prefixed env vars
  • Loading branch information
eightbitraptor committed Oct 15, 2024
1 parent f9afff4 commit f62c1f7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions gc/mmtk/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use mmtk::memory_manager;
use mmtk::memory_manager::mmtk_init;
use mmtk::util::constants::MIN_OBJECT_SIZE;
use mmtk::util::options::GCTriggerSelector;
use mmtk::util::options::PlanSelector;
use mmtk::util::Address;
use mmtk::util::ObjectReference;
use mmtk::util::VMMutatorThread;
Expand All @@ -37,13 +36,9 @@ pub extern "C" fn mmtk_is_reachable(object: ObjectReference) -> bool {

#[no_mangle]
pub extern "C" fn mmtk_builder_default() -> *mut MMTKBuilder {
let mut builder = MMTKBuilder::new_no_env_vars();
let mut builder = MMTKBuilder::new();
builder.options.no_finalizer.set(true);

// Hard code NoGC for now
let plan_selector = "MarkSweep".parse::<PlanSelector>().unwrap();
builder.options.plan.set(plan_selector);

// 100MiB
builder.options.gc_trigger.set(GCTriggerSelector::FixedHeapSize(100 << 20));

Expand Down

0 comments on commit f62c1f7

Please sign in to comment.