log-mem-usage: fixes