Module: kamailio
Branch: master
Commit: 6e6c91601e3a9a6cb797fe87a1d4c6430331db38
URL:
https://github.com/kamailio/kamailio/commit/6e6c91601e3a9a6cb797fe87a1d4c64…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-02-15T16:15:25+01:00
core: mem/tlsf_malloc - updates to used log macros
---
Modified: src/core/mem/tlsf_malloc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6e6c91601e3a9a6cb797fe87a1d4c64…
Patch:
https://github.com/kamailio/kamailio/commit/6e6c91601e3a9a6cb797fe87a1d4c64…
---
diff --git a/src/core/mem/tlsf_malloc.c b/src/core/mem/tlsf_malloc.c
index 4907142e9b..33bbf4869d 100644
--- a/src/core/mem/tlsf_malloc.c
+++ b/src/core/mem/tlsf_malloc.c
@@ -1201,22 +1201,22 @@ void tlsf_status(tlsf_t pool)
block_header_t* pb;
memlog=cfg_get(core, core_cfg, memlog);
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_status: ", "status of pool
(%p):\n", pool);
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_status: ", "heap size= %zu\n",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_status: ", "status of pool
(%p):\n", pool);
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_status: ", "heap size=
%zu\n",
control->total_size);
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_status: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_status: ",
"used= %zu, used+overhead=%zu, free=%zu, fragments=%zu\n",
control->allocated, control->real_used, control->total_size -
control->real_used, control->fragments);
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_status: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_status: ",
"max used (+overhead)=%zu, max fragments=%zu\n", control->max_used,
control->max_fragments);
/* print a summary of the 2 levels bucket list */
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_status: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_status: ",
"Free blocks matrix ('.': none, 'X': between 2^X and (2^(X+1)-1)
free blocks, X=A..Z, A=0, B=1, ...)\n");
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_status: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_status: ",
"> first-level: %d block list arrays between 2^fl and 2^(fl+1) bytes
(fl=%d..%d)\n",
FL_INDEX_COUNT, FL_INDEX_SHIFT, FL_INDEX_MAX);
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_status: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_status: ",
"v second-level: %d block lists between 2^fl+sl*2^(fl-%d) and
2^fl+(sl+1)*2^(fl-%d)-1 bytes (sl=0..%d)\n",
SL_INDEX_COUNT, SL_INDEX_COUNT_LOG2, SL_INDEX_COUNT_LOG2, SL_INDEX_COUNT-1);
for (sl = 0 ; sl < SL_INDEX_COUNT ; sl++) {
@@ -1234,7 +1234,7 @@ void tlsf_status(tlsf_t pool)
summary[fl] = 'A' + tlsf_fls(len);
}
}
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_status: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_status: ",
"%2d|%.*s|\n", sl, FL_INDEX_COUNT, summary);
}
}
@@ -1270,7 +1270,7 @@ void tlsf_sums(tlsf_t pool)
memlog=cfg_get(core, core_cfg, memlog);
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_sums: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_sums: ",
"pool (%p) summarizing all alloc'ed. fragments:\n", pool);
@@ -1287,7 +1287,7 @@ void tlsf_sums(tlsf_t pool)
x = root;
while(x){
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_sums: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_sums: ",
" count=%6d size=%10lu bytes from %s: %s(%ld)\n",
x->count,x->size,
x->file, x->func, x->line
@@ -1296,7 +1296,7 @@ void tlsf_sums(tlsf_t pool)
free(x);
x = root;
}
- LOG_(DEFAULT_FACILITY, memlog, "tlsf_sums: ",
+ LOG_FP(DEFAULT_FACILITY, memlog, "tlsf_sums: ",
"-----------------------------\n");
}