surrealdb_core/mem/
mod.rs1mod fake;
2mod track;
3
4#[cfg(not(feature = "allocator"))]
5pub static ALLOC: fake::FakeAlloc = fake::FakeAlloc::new();
6
7#[cfg(feature = "allocator")]
8#[cfg(not(any(
9 target_os = "android",
10 target_os = "freebsd",
11 target_os = "ios",
12 target_os = "linux",
13 target_os = "macos",
14 target_os = "netbsd",
15 target_os = "openbsd"
16)))]
17#[global_allocator]
18pub static ALLOC: track::TrackAlloc<std::alloc::System> =
19 track::TrackAlloc::new(std::alloc::System);
20
21#[cfg(feature = "allocator")]
22#[cfg(target_os = "android")]
23#[global_allocator]
24pub static ALLOC: track::TrackAlloc<jemallocator::Jemalloc> =
25 track::TrackAlloc::new(jemallocator::Jemalloc);
26
27#[cfg(feature = "allocator")]
28#[cfg(target_os = "freebsd")]
29#[global_allocator]
30pub static ALLOC: track::TrackAlloc<jemallocator::Jemalloc> =
31 track::TrackAlloc::new(jemallocator::Jemalloc);
32
33#[cfg(feature = "allocator")]
34#[cfg(target_os = "ios")]
35#[global_allocator]
36pub static ALLOC: track::TrackAlloc<mimalloc::MiMalloc> =
37 track::TrackAlloc::new(mimalloc::MiMalloc);
38
39#[cfg(feature = "allocator")]
40#[cfg(target_os = "linux")]
41#[global_allocator]
42pub static ALLOC: track::TrackAlloc<mimalloc::MiMalloc> =
43 track::TrackAlloc::new(mimalloc::MiMalloc);
44
45#[cfg(feature = "allocator")]
46#[cfg(target_os = "macos")]
47#[global_allocator]
48pub static ALLOC: track::TrackAlloc<mimalloc::MiMalloc> =
49 track::TrackAlloc::new(mimalloc::MiMalloc);
50
51#[cfg(feature = "allocator")]
52#[cfg(target_os = "netbsd")]
53#[global_allocator]
54pub static ALLOC: track::TrackAlloc<jemallocator::Jemalloc> =
55 track::TrackAlloc::new(jemallocator::Jemalloc);
56
57#[cfg(feature = "allocator")]
58#[cfg(target_os = "openbsd")]
59#[global_allocator]
60pub static ALLOC: track::TrackAlloc<jemallocator::Jemalloc> =
61 track::TrackAlloc::new(jemallocator::Jemalloc);