Improved diganostics.

This commit is contained in:
C. Guy Yarvin 2017-11-16 18:35:26 -08:00
parent f59222bba8
commit fafc897b62

View File

@ -380,9 +380,10 @@ u3a_reclaim(void)
}
old_w = u3a_open(u3R) + u3R->all.fre_w;
// suspected bug: infinite loop when cache is almost empty
//
#if 1
fprintf(stderr, "allocate: reclaim: half of %d entries\r\n",
u3to(u3h_root, u3R->cax.har_p)->use_w);
u3h_trim_to(u3R->cax.har_p, u3to(u3h_root, u3R->cax.har_p)->use_w / 2);
#else
/* brutal and guaranteed effective