diff options
| author | Ralf Jung <post@ralfj.de> | 2023-05-12 10:02:12 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-05-12 10:02:12 +0200 |
| commit | 154c7a5e91ff9ebf8ab08d8f7db30ed2070e56a5 (patch) | |
| tree | d3d8993e7fca57a6930649c863d6f6b37c86a3bf /compiler/rustc_data_structures/src | |
| parent | 01937562505363962cf7a5c45a81d82cfe79dd4f (diff) | |
| parent | 0b795044c6f0854445f1f2bb6443e87848e150d1 (diff) | |
| download | rust-154c7a5e91ff9ebf8ab08d8f7db30ed2070e56a5.tar.gz rust-154c7a5e91ff9ebf8ab08d8f7db30ed2070e56a5.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/profiling.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs index 5e13e7c8aaf..3c76c2b7991 100644 --- a/compiler/rustc_data_structures/src/profiling.rs +++ b/compiler/rustc_data_structures/src/profiling.rs @@ -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, |
