Changeset: a190c29239d5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a190c29239d5
Modified Files:
gdk/gdk_utils.c
monetdb5/modules/atoms/json.c
Branch: Dec2025
Log Message:
A little cleanup.
diffs (37 lines):
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -2353,7 +2353,17 @@ ma_info(const allocator *a, char *buf, s
{
buf[0] = 0;
if (a != NULL)
- snprintf(buf, bufsize, ", allocator %s, size %zu, nr %zu, used
%zu, usedmem %zu, blk_size %zu, objects %zu, inuse %zu, free_obj_hits %zu,
frees %zu, free_blk_hits %zu, tmp_used %zu, refcount %d", a->name, a->size,
a->nr, a->used, a->usedmem, a->blk_size, a->objects, a->inuse,
a->free_obj_hits, a->frees, a->free_blk_hits, a->tmp_used, a->refcount);
+ snprintf(buf, bufsize,
+ ", allocator %s, size %zu, nr %zu, used %zu%s"
+ ", usedmem %zu%s, blk_size %zu, objects %zu"
+ ", inuse %zu, free_obj_hits %zu, frees %zu"
+ ", free_blk_hits %zu, tmp_used %zu, refcount %d",
+ a->name, a->size, a->nr,
+ a->used, humansize(a->used, (char[24]){0}, 24),
+ a->usedmem, humansize(a->usedmem, (char[24]){0}, 24),
+ a->blk_size, a->objects,
+ a->inuse, a->free_obj_hits, a->frees,
+ a->free_blk_hits, a->tmp_used, a->refcount);
}
inline size_t
diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c
--- a/monetdb5/modules/atoms/json.c
+++ b/monetdb5/modules/atoms/json.c
@@ -551,10 +551,10 @@ static str
JSONisvalid(Client ctx, bit *ret, const char *const *j)
{
(void) ctx;
- allocator *ta = MT_thread_getallocator();
if (strNil(*j)) {
*ret = bit_nil;
} else {
+ allocator *ta = MT_thread_getallocator();
allocator_state ta_state = ma_open(ta);
JSON *jt = JSONparse(ta, *j);
if (jt == NULL) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]