summaryrefslogtreecommitdiffstats
path: root/database/rrdset.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-10-26 08:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-10-26 08:29:10 +0000
commit66ae4baad173098544603718e9864f0da1c0c7a3 (patch)
treed8e6f387ee9b4d9b6936e3c21208e50b86daea60 /database/rrdset.c
parentAdding upstream version 1.18.0. (diff)
downloadnetdata-66ae4baad173098544603718e9864f0da1c0c7a3.tar.xz
netdata-66ae4baad173098544603718e9864f0da1c0c7a3.zip
Adding upstream version 1.18.1.upstream/1.18.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--database/rrdset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/database/rrdset.c b/database/rrdset.c
index 26df8d737..e96d707be 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -369,13 +369,13 @@ void rrdset_free(RRDSET *st) {
case RRD_MEMORY_MODE_SAVE:
case RRD_MEMORY_MODE_MAP:
case RRD_MEMORY_MODE_RAM:
- case RRD_MEMORY_MODE_DBENGINE:
debug(D_RRD_CALLS, "Unmapping stats '%s'.", st->name);
munmap(st, st->memsize);
break;
case RRD_MEMORY_MODE_ALLOC:
case RRD_MEMORY_MODE_NONE:
+ case RRD_MEMORY_MODE_DBENGINE:
freez(st);
break;
}
@@ -569,9 +569,9 @@ RRDSET *rrdset_create_custom(
snprintfz(fullfilename, FILENAME_MAX, "%s/main.db", cache_dir);
if(memory_mode == RRD_MEMORY_MODE_SAVE || memory_mode == RRD_MEMORY_MODE_MAP ||
- memory_mode == RRD_MEMORY_MODE_RAM || memory_mode == RRD_MEMORY_MODE_DBENGINE) {
+ memory_mode == RRD_MEMORY_MODE_RAM) {
st = (RRDSET *) mymmap(
- (memory_mode == RRD_MEMORY_MODE_RAM || memory_mode == RRD_MEMORY_MODE_DBENGINE)?NULL:fullfilename
+ (memory_mode == RRD_MEMORY_MODE_RAM) ? NULL : fullfilename
, size
, ((memory_mode == RRD_MEMORY_MODE_MAP) ? MAP_SHARED : MAP_PRIVATE)
, 0
@@ -602,7 +602,7 @@ RRDSET *rrdset_create_custom(
st->alarms = NULL;
st->flags = 0x00000000;
- if(memory_mode == RRD_MEMORY_MODE_RAM || memory_mode == RRD_MEMORY_MODE_DBENGINE) {
+ if(memory_mode == RRD_MEMORY_MODE_RAM) {
memset(st, 0, size);
}
else {