mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'fix-hot-mimalloc' into 'master'
Fix mimalloc for hot reloading See merge request veloren/veloren!3453
This commit is contained in:
commit
eb0b5998ab
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6778,6 +6778,7 @@ version = "0.10.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
|
"mimalloc",
|
||||||
"vek 0.15.8",
|
"vek 0.15.8",
|
||||||
"veloren-common",
|
"veloren-common",
|
||||||
"veloren-voxygen-dynlib",
|
"veloren-voxygen-dynlib",
|
||||||
|
@ -20,3 +20,6 @@ voxygen-dynlib = {package = "veloren-voxygen-dynlib", path = "../dynlib", option
|
|||||||
|
|
||||||
# Hot Reloading
|
# Hot Reloading
|
||||||
lazy_static = {version = "1.4.0", optional = true}
|
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"))]
|
#[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");
|
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 {
|
macro_rules! skeleton_impls {
|
||||||
{ struct $Skeleton:ident { $( $(+)? $bone:ident ),* $(,)? $(:: $($field:ident : $field_ty:ty),* $(,)? )? } } => {
|
{ struct $Skeleton:ident { $( $(+)? $bone:ident ),* $(,)? $(:: $($field:ident : $field_ty:ty),* $(,)? )? } } => {
|
||||||
#[derive(Clone, Default)]
|
#[derive(Clone, Default)]
|
||||||
|
@ -2,7 +2,11 @@
|
|||||||
#![feature(bool_to_option)]
|
#![feature(bool_to_option)]
|
||||||
#![recursion_limit = "2048"]
|
#![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]
|
#[global_allocator]
|
||||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user