2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

[master] add zone memory context pools

3492.	[bug]		Fixed a regression in zone loading performance
			due to lock contention. [RT #30399]
This commit is contained in:
Evan Hunt
2013-02-20 21:39:05 -08:00
parent d642d38571
commit df925e6c66
30 changed files with 797 additions and 85 deletions

View File

@@ -73,7 +73,8 @@ dns_difftuple_create(isc_mem_t *mctx,
t = isc_mem_allocate(mctx, size);
if (t == NULL)
return (ISC_R_NOMEMORY);
t->mctx = mctx;
t->mctx = NULL;
isc_mem_attach(mctx, &t->mctx);
t->op = op;
datap = (unsigned char *)(t + 1);
@@ -105,10 +106,15 @@ dns_difftuple_create(isc_mem_t *mctx,
void
dns_difftuple_free(dns_difftuple_t **tp) {
dns_difftuple_t *t = *tp;
isc_mem_t *mctx;
REQUIRE(DNS_DIFFTUPLE_VALID(t));
dns_name_invalidate(&t->name);
t->magic = 0;
isc_mem_free(t->mctx, t);
mctx = t->mctx;
isc_mem_free(mctx, t);
isc_mem_detach(&mctx);
*tp = NULL;
}