CHECK_BLOCKS(r1, 2);
printf("Freeing p2\n");
- TALLOC_FREE(p2);
+ talloc_free(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- TALLOC_FREE(p1);
+ talloc_free(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(r1, 1);
printf("Freeing r1\n");
- TALLOC_FREE(r1);
+ talloc_free(r1);
talloc_report_full(NULL, stdout);
printf("Testing NULL\n");
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
}
CHECK_BLOCKS(r1, 2);
printf("Freeing ref\n");
- TALLOC_FREE(ref);
+ talloc_free(ref);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
CHECK_BLOCKS(r1, 1);
printf("Freeing p2\n");
- TALLOC_FREE(p2);
+ talloc_free(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 4);
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- TALLOC_FREE(p1);
+ talloc_free(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(r1, 1);
printf("Freeing r1\n");
- TALLOC_FREE(r1);
+ talloc_free(r1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
}
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- TALLOC_FREE(p1);
+ talloc_free(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p2, 2);
CHECK_BLOCKS(r1, 1);
printf("Freeing p2\n");
- TALLOC_FREE(p2);
+ talloc_free(p2);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
}
CHECK_BLOCKS(r1, 2);
printf("Freeing r1\n");
- TALLOC_FREE(r1);
+ talloc_free(r1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
CHECK_BLOCKS(p2, 1);
printf("Freeing p2\n");
- TALLOC_FREE(p2);
+ talloc_free(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 4);
printf("Freeing p1\n");
- TALLOC_FREE(p1);
+ talloc_free(p1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
}
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- TALLOC_FREE(p1);
+ talloc_free(p1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
}
talloc_increase_ref_count(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
- TALLOC_FREE(p1);
+ talloc_free(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
talloc_unlink(NULL, p1);
printf("failed: talloc_unlink() of parent should succeed\n");
return False;
}
- TALLOC_FREE(p1);
+ talloc_free(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
CHECK_BLOCKS(root, 3);
- if (TALLOC_FREE(NULL) != -1) {
- printf("TALLOC_FREE(NULL) should give -1\n");
+ if (talloc_free(NULL) != -1) {
+ printf("talloc_free(NULL) should give -1\n");
return False;
}
talloc_set_destructor(p1, fail_destructor);
- if (TALLOC_FREE(p1) != -1) {
+ if (talloc_free(p1) != -1) {
printf("Failed destructor should cause talloc_free to fail\n");
return False;
}
printf("Failed to give zero memory\n");
return False;
}
- TALLOC_FREE(p2);
+ talloc_free(p2);
if (talloc_strdup(root, NULL) != NULL) {
printf("failed: strdup on NULL should give NULL\n");
}
CHECK_BLOCKS(p2, 1);
CHECK_BLOCKS(p1, 3);
- TALLOC_FREE(p2);
+ talloc_free(p2);
d = talloc_array(p1, double, 0x20000000);
if (d) {
return False;
}
- TALLOC_FREE(p1);
+ talloc_free(p1);
CHECK_BLOCKS(root, 1);
p1 = talloc_named(root, 100, "%d bytes", 100);
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
CHECK_SIZE(NULL, 0);
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
}
el1->list2 = talloc_realloc(el1, el1->list2, struct el2 *, 200);
el1->list3 = talloc_realloc(el1, el1->list3, struct el2 *, 300);
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
}
return False;
}
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
}
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- TALLOC_FREE(p1);
+ talloc_free(p1);
talloc_steal(root, p2);
CHECK_BLOCKS(root, 2);
CHECK_SIZE(root, 20);
- TALLOC_FREE(p2);
+ talloc_free(p2);
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
p1 = talloc_size(NULL, 3);
CHECK_SIZE(NULL, 3);
- TALLOC_FREE(p1);
+ talloc_free(p1);
return True;
}
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- TALLOC_FREE(root);
+ talloc_free(root);
return True;
c1 = talloc_named_const(p1, 1, "child");
talloc_reference(p2, c1);
- TALLOC_FREE(p1);
+ talloc_free(p1);
talloc_unlink(p2, c1);
CHECK_SIZE(root, 1);
- TALLOC_FREE(p2);
- TALLOC_FREE(root);
+ talloc_free(p2);
+ talloc_free(root);
return True;
}
p1 = talloc_size(ctx, count);
p2 = talloc_strdup(p1, "foo bar");
p3 = talloc_size(p1, 300);
- TALLOC_FREE(p1);
+ talloc_free(p1);
count += 3;
} while (timeval_elapsed(&tv) < 5.0);
printf("talloc: %.0f ops/sec\n", count/timeval_elapsed(&tv));
- TALLOC_FREE(ctx);
+ talloc_free(ctx);
tv = timeval_current();
count = 0;