Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Add custom global allocator (#30)
Browse files Browse the repository at this point in the history
* Add sn-malloc

* Mimalloc
  • Loading branch information
matthewmturner authored Feb 25, 2022
1 parent 6c1ebe9 commit 368b50e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ datafusion = { version = "^7.0.0", features = ["pyarrow"] }
datafusion-expr = { version = "^7.0.0" }
datafusion-common = { version = "^7.0.0", features = ["pyarrow"] }
uuid = { version = "0.8", features = ["v4"] }
mimalloc = { version = "*", default-features = false }

[lib]
name = "_internal"
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use mimalloc::MiMalloc;
use pyo3::prelude::*;

mod catalog;
Expand All @@ -27,6 +28,9 @@ mod udaf;
mod udf;
mod utils;

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

/// Low-level DataFusion internal package.
///
/// The higher-level public API is defined in pure python files under the
Expand Down

0 comments on commit 368b50e

Please sign in to comment.