mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
17 lines
266 B
Rust
17 lines
266 B
Rust
// no-prefer-dynamic
|
|
|
|
#![crate_type = "rlib"]
|
|
|
|
extern crate custom;
|
|
|
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
|
|
|
use custom::A;
|
|
|
|
#[global_allocator]
|
|
static ALLOCATOR: A = A(AtomicUsize::new(0));
|
|
|
|
pub fn get() -> usize {
|
|
ALLOCATOR.0.load(Ordering::SeqCst)
|
|
}
|