-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Ruben Arts <ruben.arts@hotmail.com>
- Loading branch information
1 parent
8f4bc4e
commit 9e371c4
Showing
6 changed files
with
106 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
description = "A crate that provides the best memory allocator for different platforms" | ||
edition = "2021" | ||
name = "pixi_allocator" | ||
version = "0.1.0" | ||
|
||
[lib] | ||
doctest = false | ||
|
||
[dependencies] | ||
|
||
[target.'cfg(all(target_os = "windows"))'.dependencies] | ||
mimalloc = { version = "0.1.43" } | ||
|
||
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "freebsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies] | ||
tikv-jemallocator = { version = "0.6.0" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//! This crate pulls in specific allocators for different platforms to optimize | ||
//! the performance. | ||
//! | ||
//! This is placed in a separate crate to easily allow conditional compilation. | ||
//! Compiling these crates can take a long time and we do not always care about | ||
//! the extra performance. | ||
#[cfg(target_os = "windows")] | ||
#[global_allocator] | ||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; | ||
|
||
#[cfg(all( | ||
not(target_os = "windows"), | ||
not(target_os = "openbsd"), | ||
not(target_os = "freebsd"), | ||
any( | ||
target_arch = "x86_64", | ||
target_arch = "aarch64", | ||
target_arch = "powerpc64" | ||
) | ||
))] | ||
#[global_allocator] | ||
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters