2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 07:35:26 +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

@@ -275,7 +275,8 @@ isc_log_create(isc_mem_t *mctx, isc_log_t **lctxp, isc_logconfig_t **lcfgp) {
lctx = isc_mem_get(mctx, sizeof(*lctx));
if (lctx != NULL) {
lctx->mctx = mctx;
lctx->mctx = NULL;
isc_mem_attach(mctx, &lctx->mctx);
lctx->categories = NULL;
lctx->category_count = 0;
lctx->modules = NULL;
@@ -286,7 +287,7 @@ isc_log_create(isc_mem_t *mctx, isc_log_t **lctxp, isc_logconfig_t **lcfgp) {
result = isc_mutex_init(&lctx->lock);
if (result != ISC_R_SUCCESS) {
isc_mem_put(mctx, lctx, sizeof(*lctx));
isc_mem_putanddetach(&mctx, lctx, sizeof(*lctx));
return (result);
}
@@ -493,7 +494,7 @@ isc_log_destroy(isc_log_t **lctxp) {
lctx->mctx = NULL;
lctx->magic = 0;
isc_mem_put(mctx, lctx, sizeof(*lctx));
isc_mem_putanddetach(&mctx, lctx, sizeof(*lctx));
*lctxp = NULL;
}