static void show_malloc_stats(void)
{
#ifdef MEM_ALLOC_INFO
	struct MEM_ALLOC_INFO mi = MEM_ALLOC_INFO(); /* mallinfo or mallinfo2 */

	rprintf(FCLIENT, "\n");
	rprintf(FINFO, RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n",
		(int)getpid(), am_server ? "server " : "",
		am_daemon ? "daemon " : "", who_am_i());

#define PRINT_ALLOC_NUM(title, descr, num) \
	rprintf(FINFO, "  %-11s%10" SIZE_T_FMT_MOD "d   (" descr ")\n", \
		title ":", (SIZE_T_FMT_CAST)(num));

	PRINT_ALLOC_NUM("arena", "bytes from sbrk", mi.arena);
	PRINT_ALLOC_NUM("ordblks", "chunks not in use", mi.ordblks);
	PRINT_ALLOC_NUM("smblks", "free fastbin blocks", mi.smblks);
	PRINT_ALLOC_NUM("hblks", "chunks from mmap", mi.hblks);
	PRINT_ALLOC_NUM("hblkhd", "bytes from mmap", mi.hblkhd);
	PRINT_ALLOC_NUM("allmem", "bytes from sbrk + mmap", mi.arena + mi.hblkhd);
	PRINT_ALLOC_NUM("usmblks", "always 0", mi.usmblks);
	PRINT_ALLOC_NUM("fsmblks", "bytes in freed fastbin blocks", mi.fsmblks);
	PRINT_ALLOC_NUM("uordblks", "bytes used", mi.uordblks);
	PRINT_ALLOC_NUM("fordblks", "bytes free", mi.fordblks);
	PRINT_ALLOC_NUM("keepcost", "bytes in releasable chunk", mi.keepcost);

#undef PRINT_ALLOC_NUM

#endif /* MEM_ALLOC_INFO */
}
static void show_malloc_stats(void)
{
#ifdef MEM_ALLOC_INFO
	struct MEM_ALLOC_INFO mi = MEM_ALLOC_INFO();  

	rprintf(FCLIENT, "\n");
	rprintf(FINFO, RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n",
		(int)getpid(), am_server ? "server " : "",
		am_daemon ? "daemon " : "", who_am_i());

#define PRINT_ALLOC_NUM(title, descr, num) \
	rprintf(FINFO, "  %-11s%10" SIZE_T_FMT_MOD "d   (" descr ")\n", \
		title ":", (SIZE_T_FMT_CAST)(num));

	PRINT_ALLOC_NUM("arena", "bytes from sbrk", mi.arena);
	PRINT_ALLOC_NUM("ordblks", "chunks not in use", mi.ordblks);
	PRINT_ALLOC_NUM("smblks", "free fastbin blocks", mi.smblks);
	PRINT_ALLOC_NUM("hblks", "chunks from mmap", mi.hblks);
	PRINT_ALLOC_NUM("hblkhd", "bytes from mmap", mi.hblkhd);
	PRINT_ALLOC_NUM("allmem", "bytes from sbrk + mmap", mi.arena + mi.hblkhd);
	PRINT_ALLOC_NUM("usmblks", "always 0", mi.usmblks);
	PRINT_ALLOC_NUM("fsmblks", "bytes in freed fastbin blocks", mi.fsmblks);
	PRINT_ALLOC_NUM("uordblks", "bytes used", mi.uordblks);
	PRINT_ALLOC_NUM("fordblks", "bytes free", mi.fordblks);
	PRINT_ALLOC_NUM("keepcost", "bytes in releasable chunk", mi.keepcost);

#undef PRINT_ALLOC_NUM

#endif  
}