Skip to content

Commit

Permalink
Remove unused static variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wks committed Nov 29, 2024
1 parent b1e43d5 commit b3d8672
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/util/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::vm::{Collection, VMBinding};
use bytemuck::NoUninit;
use libc::{PROT_EXEC, PROT_NONE, PROT_READ, PROT_WRITE};
use std::io::{Error, Result};
use std::sync::atomic::AtomicBool;
use sysinfo::MemoryRefreshKind;
use sysinfo::{RefreshKind, System};

Expand All @@ -16,14 +15,6 @@ const MMAP_FLAGS: libc::c_int = libc::MAP_ANON | libc::MAP_PRIVATE | libc::MAP_F
// MAP_FIXED is used instead of MAP_FIXED_NOREPLACE (which is not available on macOS). We are at the risk of overwriting pre-existing mappings.
const MMAP_FLAGS: libc::c_int = libc::MAP_ANON | libc::MAP_PRIVATE | libc::MAP_FIXED;

/// This static variable controls whether we annotate mmapped memory region using `prctl`. It can be
/// set via `Options::mmap_annotation` or the `MMTK_MMAP_ANNOTATION` environment variable.
///
/// FIXME: Since it is set via `Options`, it is in theory a decision per MMTk instance. However, we
/// currently don't have a good design for multiple MMTk instances, so we use static variable for
/// now.
pub(crate) static MMAP_ANNOTATION: AtomicBool = AtomicBool::new(true);

/// Strategy for performing mmap
#[derive(Debug, Copy, Clone)]
pub struct MmapStrategy {
Expand Down

0 comments on commit b3d8672

Please sign in to comment.