Changeset: 9cbeae0ba011 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9cbeae0ba011
Modified Files:
        gdk/gdk_utils.c
Branch: Dec2025
Log Message:

Present # allocated objects differently in USR1 output.


diffs (19 lines):

diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -2651,12 +2651,12 @@ ma_info(allocator *a, char *buf, size_t 
                               pref ? pref : "", a->name,
                               a->used, humansize(a->used, (char[24]){0}, 24),
                               a->usedmem, humansize(a->usedmem, (char[24]){0}, 
24));
-               if (a->objects > 0 && (size_t) pos < bufsize)
-                       pos += snprintf(buf + pos, bufsize - pos,
-                                       ", objects %zu", a->objects);
                if (a->inuse > 0 && (size_t) pos < bufsize)
                        pos += snprintf(buf + pos, bufsize - pos,
                                        ", inuse %zu", a->inuse);
+               if (a->objects > a->inuse && (size_t) pos < bufsize)
+                       pos += snprintf(buf + pos, bufsize - pos,
+                                       ", free %zu", a->objects - a->inuse);
                if (a->tmp_used > 0 && (size_t) pos < bufsize)
                        pos += snprintf(buf + pos, bufsize - pos,
                                        ", tmp_used %zu", a->tmp_used);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to