"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-tree.c" between
stress-ng-0.12.09.tar.xz and stress-ng-0.12.10.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

stress-tree.c  (stress-ng-0.12.09.tar.xz):stress-tree.c  (stress-ng-0.12.10.tar.xz)
skipping to change at line 524 skipping to change at line 524
(void)stress_get_setting("tree-method", &info); (void)stress_get_setting("tree-method", &info);
if (!stress_get_setting("tree-size", &tree_size)) { if (!stress_get_setting("tree-size", &tree_size)) {
if (g_opt_flags & OPT_FLAGS_MAXIMIZE) if (g_opt_flags & OPT_FLAGS_MAXIMIZE)
tree_size = MAX_TREE_SIZE; tree_size = MAX_TREE_SIZE;
if (g_opt_flags & OPT_FLAGS_MINIMIZE) if (g_opt_flags & OPT_FLAGS_MINIMIZE)
tree_size = MIN_TREE_SIZE; tree_size = MIN_TREE_SIZE;
} }
n = (size_t)tree_size; n = (size_t)tree_size;
if ((nodes = calloc(n, sizeof(struct tree_node))) == NULL) { nodes = calloc(n, sizeof(*nodes));
if (!nodes) {
pr_fail("%s: malloc failed, out of memory\n", args->name); pr_fail("%s: malloc failed, out of memory\n", args->name);
return EXIT_NO_RESOURCE; return EXIT_NO_RESOURCE;
} }
if (stress_sighandler(args->name, SIGALRM, stress_tree_handler, &old_acti on) < 0) { if (stress_sighandler(args->name, SIGALRM, stress_tree_handler, &old_acti on) < 0) {
free(nodes); free(nodes);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
ret = sigsetjmp(jmp_env, 1); ret = sigsetjmp(jmp_env, 1);
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)