File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,16 @@ pub fn supersize_me(out: &mut Vec<Big>) {
71
71
72
72
#[ inline( never) ]
73
73
fn verify_stack_usage ( before_ptr : * mut Vec < Big > ) {
74
- // to check stack usage, create locals before and after
74
+ // To check stack usage, create locals before and after
75
75
// and check the difference in addresses between them.
76
76
let mut stack_var: Vec < Big > = vec ! [ ] ;
77
77
test:: black_box ( & mut stack_var) ;
78
78
let stack_usage = isize:: abs (
79
79
( & mut stack_var as * mut _ as isize ) -
80
80
( before_ptr as isize ) ) as usize ;
81
- // give space for 2 copies of `Big` + 256 "misc" bytes.
82
- if stack_usage > mem:: size_of :: < Big > ( ) * 2 + 256 {
81
+ // Give space for 2 copies of `Big` + 272 "misc" bytes
82
+ // (value observed on x86_64-pc-windows-gnu).
83
+ if stack_usage > mem:: size_of :: < Big > ( ) * 2 + 272 {
83
84
panic ! ( "used {} bytes of stack, but `struct Big` is only {} bytes" ,
84
85
stack_usage, mem:: size_of:: <Big >( ) ) ;
85
86
}
You can’t perform that action at this time.
0 commit comments