mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-23 01:46:24 +04:00
Update stack_overflow
This commit is contained in:
parent
411cc8c756
commit
e27092030c
@ -4,9 +4,12 @@
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate user_lib;
|
extern crate user_lib;
|
||||||
|
|
||||||
fn f(d: usize) {
|
#[allow(unconditional_recursion)]
|
||||||
println!("d = {}", d);
|
fn f(depth: usize) {
|
||||||
f(d + 1);
|
if depth % 10 == 0 {
|
||||||
|
println!("depth = {}", depth);
|
||||||
|
}
|
||||||
|
f(depth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
Loading…
Reference in New Issue
Block a user