Skip to content

Commit

Permalink
break after alloc failed in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed May 25, 2017
1 parent 528c12d commit 093f2bd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions sample/sample_benchmark_coroutine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "coroutine create failed, the real number is %d, ret: %d\n", i, res);
fprintf(stderr, "maybe sysconf [vm.max_map_count] extended?\n");
max_coroutine_number = i;
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions sample/sample_benchmark_coroutine_stack_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ static void benchmark_round(int index) {
fprintf(stderr, "coroutine create failed, the real number is %d\n", i);
fprintf(stderr, "maybe sysconf [vm.max_map_count] extended?\n");
MAX_COROUTINE_NUMBER = i;
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions sample/sample_benchmark_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "create coroutine task failed, real size is %d.\n", static_cast<int>(task_arr.size()));
fprintf(stderr, "maybe sysconf [vm.max_map_count] extended.\n");
max_task_number = static_cast<int>(task_arr.size());
break;
}
task_arr.push_back(new_task);
}
Expand Down
1 change: 1 addition & 0 deletions sample/sample_benchmark_task_stack_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ static void benchmark_round(int index) {
fprintf(stderr, "create coroutine task failed, real size is %d.\n", static_cast<int>(task_arr.size()));
fprintf(stderr, "maybe sysconf [vm.max_map_count] extended.\n");
max_task_number = static_cast<int>(task_arr.size());
break;
} else {
task_arr.push_back(my_task_t::create(my_task_action, 0));
}
Expand Down

0 comments on commit 093f2bd

Please sign in to comment.