Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(allocator_api)]
- use std::heap::*;
- extern {
- fn exit(a: i32) -> !;
- }
- fn main() {
- unsafe {
- let x = Layout::from_size_align(11529215046068469760, 8).unwrap();
- match Heap.alloc(x) {
- Ok(_) => exit(1),
- Err(_) => exit(2),
- }
- }
- }
Add Comment
Please, Sign In to add comment