mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +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:
@@ -732,7 +732,9 @@ dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp)
|
||||
|
||||
for (i = 0; i < DNS_SECTION_MAX; i++)
|
||||
ISC_LIST_INIT(m->sections[i]);
|
||||
m->mctx = mctx;
|
||||
|
||||
m->mctx = NULL;
|
||||
isc_mem_attach(mctx, &m->mctx);
|
||||
|
||||
ISC_LIST_INIT(m->scratchpad);
|
||||
ISC_LIST_INIT(m->cleanup);
|
||||
@@ -786,7 +788,7 @@ dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp)
|
||||
if (m->rdspool != NULL)
|
||||
isc_mempool_destroy(&m->rdspool);
|
||||
m->magic = 0;
|
||||
isc_mem_put(mctx, m, sizeof(dns_message_t));
|
||||
isc_mem_putanddetach(&mctx, m, sizeof(dns_message_t));
|
||||
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
@@ -815,7 +817,7 @@ dns_message_destroy(dns_message_t **msgp) {
|
||||
isc_mempool_destroy(&msg->namepool);
|
||||
isc_mempool_destroy(&msg->rdspool);
|
||||
msg->magic = 0;
|
||||
isc_mem_put(msg->mctx, msg, sizeof(dns_message_t));
|
||||
isc_mem_putanddetach(&msg->mctx, msg, sizeof(dns_message_t));
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
Reference in New Issue
Block a user