2016-04-26 12:51:14 -05:00
|
|
|
// no-prefer-dynamic
|
|
|
|
|
|
|
|
#![crate_type = "rlib"]
|
|
|
|
|
2017-06-03 16:54:08 -05:00
|
|
|
extern crate custom;
|
2016-04-26 12:51:14 -05:00
|
|
|
|
2017-06-03 16:54:08 -05:00
|
|
|
use std::sync::atomic::{ATOMIC_USIZE_INIT, Ordering};
|
|
|
|
|
|
|
|
use custom::A;
|
|
|
|
|
|
|
|
#[global_allocator]
|
|
|
|
static ALLOCATOR: A = A(ATOMIC_USIZE_INIT);
|
|
|
|
|
|
|
|
pub fn get() -> usize {
|
|
|
|
ALLOCATOR.0.load(Ordering::SeqCst)
|
|
|
|
}
|