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

Print number of blocks on allocator free list.


diffs (17 lines):

diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -2663,6 +2663,13 @@ ma_info(allocator *a, char *buf, size_t 
                if (a->refcount > 0 && (size_t) pos < bufsize)
                        pos += snprintf(buf + pos, bufsize - pos,
                                        ", refcount %d", a->refcount);
+               size_t nfree = 0;
+               for (freed_t *f = a->freelist_blks; f; f = f->n)
+                       nfree++;
+               if (nfree > 0)
+                       pos += snprintf(buf + pos, bufsize - pos,
+                                       ", %zu block%s in freelist",
+                                       nfree, nfree == 1 ? "" : "s");
                COND_UNLOCK_ALLOCATOR(a);
        }
        return pos;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to