Guest User

Untitled

a guest
Apr 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #![feature(allocator_api)]
  2.  
  3. use std::heap::*;
  4.  
  5. extern {
  6. fn exit(a: i32) -> !;
  7. }
  8.  
  9. fn main() {
  10. unsafe {
  11. let x = Layout::from_size_align(11529215046068469760, 8).unwrap();
  12. match Heap.alloc(x) {
  13. Ok(_) => exit(1),
  14. Err(_) => exit(2),
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment