From eaa926a0862b720ef94eb1c6ccebae2bd80498d5 Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Fri, 12 Jun 2020 21:55:51 -0700 Subject: [PATCH] noun: road-size printfs on u3m_fall --- pkg/urbit/noun/manage.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg/urbit/noun/manage.c b/pkg/urbit/noun/manage.c index 663d16c29e..a7b8b803e3 100644 --- a/pkg/urbit/noun/manage.c +++ b/pkg/urbit/noun/manage.c @@ -788,6 +788,13 @@ u3m_leap(c3_w pad_w) #endif } +void +_print_diff(c3_c* cap_c, c3_w a, c3_w b) +{ + c3_w diff = apar_p); #if 0 + /* If you're printing a lot of these you need to change + * u3a_print_memory from fprintf to u3l_log + */ fprintf(stderr, "fall: from %s %p, to %s %p (cap 0x%x, was 0x%x)\r\n", _(u3a_is_north(u3R)) ? "north" : "south", u3R, @@ -803,6 +813,9 @@ u3m_fall() u3to(u3_road, u3R->par_p), u3R->hat_p, u3R->rut_p); + _print_diff("unused free", u3R->hat_p, u3R->cap_p); + _print_diff("freeing", u3R->rut_p, u3R->hat_p); + _print_diff("stack", u3R->cap_p, u3R->mat_p); #endif u3to(u3_road, u3R->par_p)->pro.nox_d += u3R->pro.nox_d;