ticki %!s(int64=8) %!d(string=hai) anos
pai
achega
f56d86e50e
Modificáronse 4 ficheiros con 6 adicións e 5 borrados
  1. 2 4
      src/block.rs
  2. 1 1
      src/bookkeeper.rs
  3. 2 0
      tests/scaling.rs
  4. 1 0
      tests/too_many_threads.rs

+ 2 - 4
src/block.rs

@@ -81,8 +81,8 @@ impl Block {
         Block {
             size: 0,
             ptr: unsafe {
-                // By the invariants of this type (the size is bounded by the address space), this
-                // conversion isn't overflowing.
+                // By the invariants of this type (the end is addressable), this conversion isn't
+                // overflowing.
                 Pointer::new(*self.ptr).offset(self.size as isize)
             },
         }
@@ -142,8 +142,6 @@ impl Block {
     }
 
     /// Volatile zero this memory.
-    ///
-    /// Note that this is a NOOP in release mode.
     pub fn sec_zero(&mut self) {
         use core::intrinsics;
 

+ 1 - 1
src/bookkeeper.rs

@@ -415,7 +415,7 @@ impl Bookkeeper {
 
                 // Place the excessive block back.
                 let (res, excessive) = block.split(new_size);
-                // Remove_at may have shortened the Vvector.
+                // Remove_at may have shortened the vector.
                 if ind.start == self.pool.len() {
                     self.push_no_reserve(excessive);
                 } else if !excessive.is_empty() {

+ 2 - 0
tests/scaling.rs

@@ -3,6 +3,7 @@ extern crate ralloc;
 mod util;
 
 #[test]
+#[ignore]
 fn big_alloc() {
     util::multiply(|| {
         let mut vec = Vec::new();
@@ -18,6 +19,7 @@ fn big_alloc() {
 }
 
 #[test]
+#[ignore]
 fn many_small_allocs() {
     util::multiply(|| {
         let mut vec = Vec::new();

+ 1 - 0
tests/too_many_threads.rs

@@ -22,6 +22,7 @@ fn make_thread() -> thread::JoinHandle<()> {
 }
 
 #[test]
+#[ignore]
 fn multithread_join_handle_vec() {
     util::multiply(|| {
         let mut join = Vec::new();