From 10d0f1466b618c9c606c144011743108ae454b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Tue, 15 Nov 2022 23:24:21 +0100 Subject: [PATCH] Reduce exceptions overallocation on non Windows x86_64 Addressing https://github.com/rust-lang/rust/pull/103894#discussion_r1020950196 --- library/unwind/src/libunwind.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/unwind/src/libunwind.rs b/library/unwind/src/libunwind.rs index 15500f7fd35..ab8e4bf11b1 100644 --- a/library/unwind/src/libunwind.rs +++ b/library/unwind/src/libunwind.rs @@ -27,7 +27,10 @@ pub type _Unwind_Trace_Fn = #[cfg(target_arch = "x86")] pub const unwinder_private_data_size: usize = 5; -#[cfg(target_arch = "x86_64")] +#[cfg(all(target_arch = "x86_64", not(target_os = "windows")))] +pub const unwinder_private_data_size: usize = 2; + +#[cfg(all(target_arch = "x86_64", target_os = "windows"))] pub const unwinder_private_data_size: usize = 6; #[cfg(all(target_arch = "arm", not(any(target_os = "ios", target_os = "watchos"))))]