File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 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>) {
7171
7272#[ inline( never) ]
7373fn 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
7575 // and check the difference in addresses between them.
7676 let mut stack_var: Vec < Big > = vec ! [ ] ;
7777 test:: black_box ( & mut stack_var) ;
7878 let stack_usage = isize:: abs (
7979 ( & mut stack_var as * mut _ as isize ) -
8080 ( 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 {
8384 panic ! ( "used {} bytes of stack, but `struct Big` is only {} bytes" ,
8485 stack_usage, mem:: size_of:: <Big >( ) ) ;
8586 }
You can’t perform that action at this time.
0 commit comments