Commit f810b401 authored by Bob Halley's avatar Bob Halley
Browse files

allow memory quota to be specified

parent 16baa70f
......@@ -335,13 +335,14 @@ main(int argc, char *argv[]) {
dbinfo *dbi;
dns_dbversion_t *version;
dns_name_t *origin;
size_t memory_quota = 0;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(dns_dbtable_create(mctx, dns_rdataclass_in, &dbtable) ==
DNS_R_SUCCESS);
strcpy(dbtype, "rbt");
while ((ch = getopt(argc, argv, "c:d:t:z:P:gpqvT")) != -1) {
while ((ch = getopt(argc, argv, "c:d:t:z:P:Q:gpqvT")) != -1) {
switch (ch) {
case 'c':
result = load(optarg, ".", ISC_TRUE);
......@@ -364,6 +365,10 @@ main(int argc, char *argv[]) {
case 'P':
pause_every = atoi(optarg);
break;
case 'Q':
memory_quota = atoi(optarg);
isc_mem_setquota(mctx, memory_quota);
break;
case 't':
type = atoi(optarg);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment