mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix mimalloc for hot reloading
This commit is contained in:
parent
53f885ff57
commit
16c5c657cc
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6778,6 +6778,7 @@ version = "0.10.0"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"lazy_static",
|
||||
"mimalloc",
|
||||
"vek 0.15.8",
|
||||
"veloren-common",
|
||||
"veloren-voxygen-dynlib",
|
||||
|
@ -20,3 +20,6 @@ voxygen-dynlib = {package = "veloren-voxygen-dynlib", path = "../dynlib", option
|
||||
|
||||
# Hot Reloading
|
||||
lazy_static = {version = "1.4.0", optional = true}
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
mimalloc = "0.1.29"
|
||||
|
@ -4,6 +4,10 @@
|
||||
#[cfg(all(feature = "be-dyn-lib", feature = "use-dyn-lib"))]
|
||||
compile_error!("Can't use both \"be-dyn-lib\" and \"use-dyn-lib\" features at once");
|
||||
|
||||
#[cfg(all(target_os = "windows", feature = "be-dyn-lib"))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
macro_rules! skeleton_impls {
|
||||
{ struct $Skeleton:ident { $( $(+)? $bone:ident ),* $(,)? $(:: $($field:ident : $field_ty:ty),* $(,)? )? } } => {
|
||||
#[derive(Clone, Default)]
|
||||
|
@ -2,7 +2,11 @@
|
||||
#![feature(bool_to_option)]
|
||||
#![recursion_limit = "2048"]
|
||||
|
||||
#[cfg(all(target_os = "windows", not(feature = "tracy-memory")))]
|
||||
#[cfg(all(
|
||||
target_os = "windows",
|
||||
not(feature = "tracy-memory"),
|
||||
not(feature = "hot-egui")
|
||||
))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user