1
Fork 0

Rollup merge of #111393 - klensy:win-0.48, r=oli-obk

bump windows crate 0.46 -> 0.48

This drops duped version of crate(0.46), reduces `rustc_driver.dll` ~800kb and reduces exported functions number from 26k to 22k.

Also while here, added `tidy-alphabetical` sorting to lists in tidy allowed lists.
This commit is contained in:
Matthias Krüger 2023-05-12 07:11:12 +02:00 committed by GitHub
commit d075b6c16d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 69 additions and 59 deletions

View file

@ -865,14 +865,16 @@ cfg_if! {
use std::mem;
use windows::{
Win32::System::ProcessStatus::{K32GetProcessMemoryInfo, PROCESS_MEMORY_COUNTERS},
// FIXME: change back to K32GetProcessMemoryInfo when windows crate
// updated to 0.49.0+ to drop dependency on psapi.dll
Win32::System::ProcessStatus::{GetProcessMemoryInfo, PROCESS_MEMORY_COUNTERS},
Win32::System::Threading::GetCurrentProcess,
};
let mut pmc = PROCESS_MEMORY_COUNTERS::default();
let pmc_size = mem::size_of_val(&pmc);
unsafe {
K32GetProcessMemoryInfo(
GetProcessMemoryInfo(
GetCurrentProcess(),
&mut pmc,
pmc_size as u32,