We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1e5831f + 6414d13 commit 7b76fdeCopy full SHA for 7b76fde
drivers/char/rust_example_3.rs
@@ -36,6 +36,15 @@ impl KernelModule for RustExample3 {
36
println!("[3] Parameters:");
37
println!("[3] my_bool: {}", my_bool.read());
38
println!("[3] my_i32: {}", my_i32.read());
39
+
40
+ // Including this large variable on the stack will trigger a call to
41
+ // `compiler_builtins::probestack::__rust_probestack` on x86_64 (in
42
+ // debug mode at least).
43
+ // This will verify that we are able to link modules which call
44
+ // `__rust_probestack`.
45
+ let x: [u64; 1028] = [5; 1028];
46
+ println!("Large array has length: {}", x.len());
47
48
Ok(RustExample3 {
49
message: "on the heap!".to_owned(),
50
})
0 commit comments