manual2.rs 222 B

123456789101112
  1. extern crate ralloc;
  2. mod util;
  3. #[test]
  4. fn manual2() {
  5. let ptr = ralloc::alloc(1723, 8);
  6. assert!(!ptr.is_null());
  7. for offset in 0..1723 {
  8. unsafe { *(ptr as *mut u8).offset(offset) = 0 as u8 };
  9. }
  10. }