Commit eeb8892d authored by Tatuya JINMEI 神明達哉's avatar Tatuya JINMEI 神明達哉
Browse files

Global memory context had the wrong name (RT #17932)

parent 1dd74a07
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: main.c,v 1.161 2008/01/18 23:46:57 tbox Exp $ */ /* $Id: main.c,v 1.162 2008/04/03 23:14:52 jinmei Exp $ */
/*! \file */ /*! \file */
...@@ -878,6 +878,7 @@ main(int argc, char *argv[]) { ...@@ -878,6 +878,7 @@ main(int argc, char *argv[]) {
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
ns_main_earlyfatal("isc_mem_create() failed: %s", ns_main_earlyfatal("isc_mem_create() failed: %s",
isc_result_totext(result)); isc_result_totext(result));
isc_mem_setname(ns_g_mctx, "main", NULL);
setup(); setup();
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: resolver.c,v 1.365 2008/04/03 05:55:52 marka Exp $ */ /* $Id: resolver.c,v 1.366 2008/04/03 23:14:52 jinmei Exp $ */
/*! \file */ /*! \file */
...@@ -6505,6 +6505,7 @@ dns_resolver_create(dns_view_t *view, ...@@ -6505,6 +6505,7 @@ dns_resolver_create(dns_view_t *view,
goto cleanup_buckets; goto cleanup_buckets;
} }
res->buckets[i].mctx = NULL; res->buckets[i].mctx = NULL;
snprintf(name, sizeof(name), "res%u", i);
#ifdef ISC_PLATFORM_USETHREADS #ifdef ISC_PLATFORM_USETHREADS
/* /*
* Use a separate memory context for each bucket to reduce * Use a separate memory context for each bucket to reduce
...@@ -6517,12 +6518,11 @@ dns_resolver_create(dns_view_t *view, ...@@ -6517,12 +6518,11 @@ dns_resolver_create(dns_view_t *view,
DESTROYLOCK(&res->buckets[i].lock); DESTROYLOCK(&res->buckets[i].lock);
goto cleanup_buckets; goto cleanup_buckets;
} }
isc_mem_setname(res->buckets[i].mctx, name, NULL);
#else #else
isc_mem_attach(view->mctx, &res->buckets[i].mctx); isc_mem_attach(view->mctx, &res->buckets[i].mctx);
#endif #endif
snprintf(name, sizeof(name), "res%u", i);
isc_task_setname(res->buckets[i].task, name, res); isc_task_setname(res->buckets[i].task, name, res);
isc_mem_setname(res->buckets[i].mctx, name, NULL);
ISC_LIST_INIT(res->buckets[i].fctxs); ISC_LIST_INIT(res->buckets[i].fctxs);
res->buckets[i].exiting = ISC_FALSE; res->buckets[i].exiting = ISC_FALSE;
buckets_created++; buckets_created++;
......
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