diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-09 04:52:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-09 04:52:39 +0000 |
commit | 89f3604407aff8f4cb2ed958252c61e23c767e24 (patch) | |
tree | 7fbf408102cab051557d38193524d8c6e991d070 /web/api/queries/rrdr.c | |
parent | Adding upstream version 1.34.1. (diff) | |
download | netdata-89f3604407aff8f4cb2ed958252c61e23c767e24.tar.xz netdata-89f3604407aff8f4cb2ed958252c61e23c767e24.zip |
Adding upstream version 1.35.0.upstream/1.35.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/api/queries/rrdr.c')
-rw-r--r-- | web/api/queries/rrdr.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/web/api/queries/rrdr.c b/web/api/queries/rrdr.c index b64868222..4d05778c1 100644 --- a/web/api/queries/rrdr.c +++ b/web/api/queries/rrdr.c @@ -78,12 +78,12 @@ inline static void rrdr_unlock_rrdset(RRDR *r) { } if(likely(r->has_st_lock)) { - rrdset_unlock(r->st); r->has_st_lock = 0; + rrdset_unlock(r->st); } } -inline void rrdr_free(RRDR *r) +inline void rrdr_free(ONEWAYALLOC *owa, RRDR *r) { if(unlikely(!r)) { error("NULL value given!"); @@ -91,21 +91,21 @@ inline void rrdr_free(RRDR *r) } rrdr_unlock_rrdset(r); - freez(r->t); - freez(r->v); - freez(r->o); - freez(r->od); - freez(r); + onewayalloc_freez(owa, r->t); + onewayalloc_freez(owa, r->v); + onewayalloc_freez(owa, r->o); + onewayalloc_freez(owa, r->od); + onewayalloc_freez(owa, r); } -RRDR *rrdr_create(struct rrdset *st, long n, struct context_param *context_param_list) +RRDR *rrdr_create(ONEWAYALLOC *owa, struct rrdset *st, long n, struct context_param *context_param_list) { if (unlikely(!st)) { error("NULL value given!"); return NULL; } - RRDR *r = callocz(1, sizeof(RRDR)); + RRDR *r = onewayalloc_callocz(owa, 1, sizeof(RRDR)); r->st = st; if (!context_param_list || !(context_param_list->flags & CONTEXT_FLAGS_ARCHIVE)) { @@ -126,10 +126,10 @@ RRDR *rrdr_create(struct rrdset *st, long n, struct context_param *context_param r->n = n; - r->t = callocz((size_t)n, sizeof(time_t)); - r->v = mallocz(n * r->d * sizeof(calculated_number)); - r->o = mallocz(n * r->d * sizeof(RRDR_VALUE_FLAGS)); - r->od = mallocz(r->d * sizeof(RRDR_DIMENSION_FLAGS)); + r->t = onewayalloc_callocz(owa, (size_t)n, sizeof(time_t)); + r->v = onewayalloc_mallocz(owa, n * r->d * sizeof(calculated_number)); + r->o = onewayalloc_mallocz(owa, n * r->d * sizeof(RRDR_VALUE_FLAGS)); + r->od = onewayalloc_mallocz(owa, r->d * sizeof(RRDR_DIMENSION_FLAGS)); // set the hidden flag on hidden dimensions int c; |