diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2022-04-28 11:19:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 11:19:15 +0300 |
commit | 091540d59aaf80c8198c5a7fbd5440353d82d7ff (patch) | |
tree | 921ab7bf724f66555bf469952dc2530097ab2c35 /database/rrddim.c | |
parent | f1622658a10a69661834d9f3d5c0c685aec2f3fd (diff) |
feat(dbengine): make dbengine page cache undumpable and dedupuble (#12765)
* make netdata more awesome
* reworked on-madvise and mmap to provide clarity
Diffstat (limited to 'database/rrddim.c')
-rw-r--r-- | database/rrddim.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/database/rrddim.c b/database/rrddim.c index df45363bc7..3c013e1ded 100644 --- a/database/rrddim.c +++ b/database/rrddim.c @@ -244,12 +244,11 @@ RRDDIM *rrddim_add_custom(RRDSET *st, const char *id, const char *name, collecte if(memory_mode == RRD_MEMORY_MODE_SAVE || memory_mode == RRD_MEMORY_MODE_MAP || memory_mode == RRD_MEMORY_MODE_RAM) { - rd = (RRDDIM *)mymmap( - (memory_mode == RRD_MEMORY_MODE_RAM) ? NULL : fullfilename - , size - , ((memory_mode == RRD_MEMORY_MODE_MAP) ? MAP_SHARED : MAP_PRIVATE) - , 1 - ); + rd = (RRDDIM *)netdata_mmap( + (memory_mode == RRD_MEMORY_MODE_RAM) ? NULL : fullfilename, + size, + ((memory_mode == RRD_MEMORY_MODE_MAP) ? MAP_SHARED : MAP_PRIVATE), + 1); if(likely(rd)) { // we have a file mapped for rd |