Commit c1a463d7 authored by qinsoon's avatar qinsoon

remove warnings

parent 37ab591c
#![allow(dead_code)]
use utils::ByteSize;
#[derive(Clone, Debug)]
......@@ -9,6 +11,7 @@ pub struct GCType {
}
impl GCType {
#[allow(unused_assignments)]
pub fn gen_ref_offsets(&self) -> Vec<ByteSize> {
let mut ret = vec![];
......@@ -78,7 +81,7 @@ impl RepeatingRefPattern {
pub fn append_offsets(&self, base: ByteSize, vec: &mut Vec<ByteSize>) -> ByteSize {
let mut cur_base = base;
for i in 0..self.count {
for _ in 0..self.count {
cur_base = self.pattern.append_offsets(cur_base, vec);
}
......
#![allow(dead_code)]
use utils::Address;
use heap::immix;
use heap::gc;
use aligned_alloc;
use std::collections::LinkedList;
use std::sync::Arc;
use std::sync::RwLock;
pub struct FreeListSpace {
current_nodes : LinkedList<Box<FreeListNode>>,
......
......@@ -5,9 +5,8 @@ mod treadmill;
pub use heap::freelist::treadmill::FreeListSpace;
use std::sync::Arc;
use std::sync::RwLock;
use heap::gc;
use utils::{Address, ObjectReference};
use utils::Address;
use heap::immix;
#[inline(never)]
......
......@@ -9,7 +9,6 @@ use common::AddressMap;
use objectmodel;
use std::ptr;
use std::sync::Arc;
use std::fmt;
use std::sync::Mutex;
......@@ -259,7 +258,7 @@ impl Treadmill {
impl fmt::Display for Treadmill {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "next: {}", self.from_space_next);
write!(f, "next: {}", self.from_space_next).unwrap();
write!(f, "from:").unwrap();
for i in 0..self.spaces[self.from].len() {
write!(f, "{}->", self.spaces[self.from][i]).unwrap();
......@@ -306,7 +305,7 @@ mod tests {
#[test]
fn test_treadmill_alloc() {
let mut space = FreeListSpace::new(BLOCK_SIZE * 10);
let space = FreeListSpace::new(BLOCK_SIZE * 10);
for i in 0..10 {
let ret = space.alloc(BLOCK_SIZE, 8);
......@@ -317,7 +316,7 @@ mod tests {
#[test]
#[ignore]
fn test_treadmill_alloc_spanblock() {
let mut space = FreeListSpace::new(BLOCK_SIZE * 10);
let space = FreeListSpace::new(BLOCK_SIZE * 10);
for i in 0..5 {
let ret = space.alloc(BLOCK_SIZE * 2, 8);
......@@ -327,7 +326,7 @@ mod tests {
#[test]
fn test_treadmill_alloc_exhaust() {
let mut space = FreeListSpace::new(BLOCK_SIZE * 10);
let space = FreeListSpace::new(BLOCK_SIZE * 10);
for i in 0..20 {
let ret = space.alloc(BLOCK_SIZE, 8);
......
......@@ -2,13 +2,12 @@ use heap::immix::MUTATORS;
use heap::immix::N_MUTATORS;
use heap::immix::ImmixMutatorLocal;
use heap::immix::ImmixSpace;
use heap::immix::ImmixLineMarkTable;
use heap::freelist::FreeListSpace;
use objectmodel;
use heap::Space;
use utils::{Address, ObjectReference};
use utils::{LOG_POINTER_SIZE, POINTER_SIZE};
use utils::POINTER_SIZE;
use utils::bit_utils;
use std::sync::atomic::{AtomicIsize, Ordering};
......
......@@ -225,6 +225,7 @@ impl ImmixSpace {
}
#[allow(unused_variables)]
#[allow(unused_assignments)]
pub fn sweep(&self) {
let mut free_lines = 0;
let mut usable_blocks = 0;
......
......@@ -151,6 +151,7 @@ pub extern fn muentry_alloc_large(mutator: *mut ImmixMutatorLocal, size: usize,
}
#[no_mangle]
#[allow(unused_variables)]
pub extern fn muentry_init_large_object(mutator: *mut ImmixMutatorLocal, obj: ObjectReference, encode: u8) {
MY_GC.read().unwrap().as_ref().unwrap().lo_space.init_object(obj.to_address(), encode);
}
\ No newline at end of file
......@@ -22,11 +22,16 @@ const OBJECT_ALIGN: usize = 8;
const WORK_LOAD : usize = 10000;
#[allow(dead_code)]
const SPACIOUS_SPACE_SIZE : usize = 500 << 20; // 500mb
#[allow(dead_code)]
const LIMITED_SPACE_SIZE : usize = 20 << 20; // 20mb
#[allow(dead_code)]
const SMALL_SPACE_SIZE : usize = 1 << 19; // 512kb
#[allow(dead_code)]
const IMMIX_SPACE_SIZE : usize = SPACIOUS_SPACE_SIZE;
#[allow(dead_code)]
const LO_SPACE_SIZE : usize = SPACIOUS_SPACE_SIZE;
#[test]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment