summaryrefslogtreecommitdiff
path: root/src/common/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/db.c')
-rw-r--r--src/common/db.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/db.c b/src/common/db.c
index 7ac9b2dc7..f2e69abbb 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -2400,10 +2400,10 @@ DBReleaser db_custom_release(DBRelease which)
* @see #DBMap_impl
* @see #db_fix_options(DBType,DBOptions)
*/
-DBMap* db_alloc(const char *file, int line, DBType type, DBOptions options, unsigned short maxlen)
-{
+DBMap* db_alloc(const char *file, const char *func, int line, DBType type, DBOptions options, unsigned short maxlen) {
DBMap_impl* db;
unsigned int i;
+ char ers_name[50];
#ifdef DB_ENABLE_STATS
DB_COUNTSTAT(db_alloc);
@@ -2445,7 +2445,8 @@ DBMap* db_alloc(const char *file, int line, DBType type, DBOptions options, unsi
db->free_max = 0;
db->free_lock = 0;
/* Other */
- db->nodes = ers_new(sizeof(struct dbn),"db.c::db_alloc",ERS_OPT_NONE);
+ snprintf(ers_name, 50, "db_alloc:nodes:%s:%s:%d",func,file,line);
+ db->nodes = ers_new(sizeof(struct dbn),ers_name,ERS_OPT_WAIT|ERS_OPT_FREE_NAME);
db->cmp = db_default_cmp(type);
db->hash = db_default_hash(type);
db->release = db_default_release(type, options);