mirror of
https://github.com/bspeice/qadapt
synced 2024-11-14 10:08:08 -05:00
20 lines
422 B
Rust
20 lines
422 B
Rust
extern crate qadapt;
|
|
|
|
use qadapt::allocate_panic;
|
|
use qadapt::QADAPT;
|
|
|
|
#[global_allocator]
|
|
static Q: QADAPT = QADAPT;
|
|
|
|
#[allocate_panic]
|
|
fn does_allocate() -> Box<u8> {
|
|
Box::new(0)
|
|
}
|
|
|
|
fn main() {
|
|
// If you were to run `cargo run --example release_mode`, this program blows up.
|
|
// If, however, you ran `cargo run --release --example release_mode`,
|
|
// nothing interesting will happen.
|
|
does_allocate();
|
|
}
|