mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 23:32:05 -04:00
allow memory quota to be specified
This commit is contained in:
parent
16baa70f9d
commit
f810b40189
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue