2017-07-03 18:47:58 -05:00
|
|
|
#![feature(alloc, heap_api)]
|
|
|
|
|
|
|
|
extern crate alloc;
|
|
|
|
|
2017-07-10 15:34:54 -05:00
|
|
|
// error-pattern: tried to access memory with alignment 1, but alignment 2 is required
|
2017-07-03 18:47:58 -05:00
|
|
|
|
|
|
|
use alloc::heap::*;
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let x = allocate(1, 1);
|
|
|
|
let _y = reallocate(x, 1, 1, 2);
|
|
|
|
}
|
|
|
|
}
|