-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #120205 - Berrysoft:windows-alloc-init, r=ChrisDenton
std: make `HEAP` initializer never inline The system allocator for Windows calls `init_or_get_process_heap` every time allocating. It generates very much useless code and makes the binary larger. The `HEAP` only needs to initialize once before the main fn. Concerns: * I'm not sure if `init` will be properly called in cdylib. * Do we need to ensure the allocator works if the user enables `no_main`? * Should we panic if `GetProcessHeap` returns null?
- Loading branch information
Showing
1 changed file
with
13 additions
and
11 deletions.
There are no files selected for viewing
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