xref: /relibc/ralloc/tests/manual2.rs (revision 867c809039aef77dbce22e98b1009b8995dfa868)
1 extern crate ralloc;
2 
3 #[global_allocator]
4 static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
5 
6 mod util;
7 
8 #[test]
manual2()9 fn manual2() {
10     let ptr = ralloc::alloc(1723, 8);
11     assert!(!ptr.is_null());
12     for offset in 0..1723 {
13         unsafe { *(ptr as *mut u8).offset(offset) = 0 as u8 };
14     }
15 }
16