microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
alex/katas-update

Branches

Tags

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

Clone

HTTPS

Download ZIP

allocator/src/lib.rs

15lines · modecode

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