]>
Commit | Line | Data |
---|---|---|
0531ce1d XL |
1 | #![feature(allocator_api)] |
2 | #![crate_type = "rlib"] | |
3 | ||
83c7162d | 4 | use std::alloc::*; |
0531ce1d XL |
5 | |
6 | pub struct A; | |
7 | ||
83c7162d | 8 | unsafe impl GlobalAlloc for A { |
94b46f34 | 9 | unsafe fn alloc(&self, _: Layout) -> *mut u8 { |
0531ce1d XL |
10 | loop {} |
11 | } | |
12 | ||
94b46f34 | 13 | unsafe fn dealloc(&self, _ptr: *mut u8, _: Layout) { |
0531ce1d XL |
14 | loop {} |
15 | } | |
54a0048b | 16 | } |