OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix macOS build
[android-x86/system-extras.git]
/
simpleperf
/
runtest
/
function_recursive.cpp
1
constexpr int LOOP_COUNT = 5000000;
2
3
void FunctionRecursive(int loop) {
4
for (volatile int i = 0; i < LOOP_COUNT; ++i) {
5
}
6
if (loop > 0) {
7
FunctionRecursive(loop - 1);
8
}
9
for (volatile int i = 0; i < LOOP_COUNT; ++i) {
10
}
11
}
12
13
int main() {
14
while (true) {
15
FunctionRecursive(10);
16
}
17
return 0;
18
}