microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
c3335c732ee0487abbcca366ce45eeaa7e9c4e7d

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

allocator/src/lib.rs

21lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#[cfg(not(any(
5 target_family = "wasm",
6 all(target_family = "windows", target_arch = "aarch64")
7)))]
8pub mod mimalloc;
9
10/// Declare a global allocator if the platform supports it.
11#[macro_export]
12macro_rules! assign_global {
13 () => {
14 #[cfg(not(any(
15 target_family = "wasm",
16 all(target_family = "windows", target_arch = "aarch64")
17 )))]
18 #[global_allocator]
19 static GLOBAL: allocator::mimalloc::Mimalloc = allocator::mimalloc::Mimalloc;
20 };
21}
22