mirror of
https://github.com/bspeice/qadapt
synced 2025-06-30 21:36:41 -04:00
Takes us 576 allocations to get up and running
I need a better way to handle initialization costs...
This commit is contained in:
14
tests/initial.rs
Normal file
14
tests/initial.rs
Normal file
@ -0,0 +1,14 @@
|
||||
extern crate qadapt;
|
||||
|
||||
use qadapt::QADAPT;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
#[global_allocator]
|
||||
static A: QADAPT = QADAPT::INIT;
|
||||
|
||||
#[test]
|
||||
fn init() {
|
||||
// Make sure that we don't have any allocations at the start
|
||||
// that pollute other tests
|
||||
assert!(!A.has_allocated.load(Ordering::SeqCst));
|
||||
}
|
Reference in New Issue
Block a user