--- stat.c Tue Mar 17 05:48:18 1998 +++ stat.c Wed Jun 10 16:22:31 1998 @@ -1,4 +1,3 @@ - /* * $Id: stat.c,v 1.113.2.25 1998/03/17 05:48:18 wessels Exp $ * @@ -817,6 +820,7 @@ ms.bytes_free >> 10, percent(ms.bytes_free, ms.bytes_total)); #elif HAVE_MALLINFO mp = mallinfo(); +#if !HAVE_DL_MALLOC storeAppendPrintf(sentry, "{Memory usage for %s via mallinfo():}\n", appname); storeAppendPrintf(sentry, "{\tTotal space in arena: %6d KB}\n", @@ -837,6 +841,25 @@ t = mp.fsmblks + mp.fordblks; storeAppendPrintf(sentry, "{\tTotal free: %6d KB %d%%}\n", t >> 10, percent(t, mp.arena)); +#else + storeAppendPrintf(sentry, "{Memory usage for %s via mallinfo():}\n", + appname); + storeAppendPrintf(sentry, "{\tAllocation via sbrk()}\n"); + storeAppendPrintf(sentry, "{\t\tTotal allocated: %6d KB}\n", + mp.arena >> 10); + storeAppendPrintf(sentry, "{\t\tTotal in use: %6d KB %d%%}\n", + mp.uordblks >> 10, percent(mp.uordblks, mp.arena)); + storeAppendPrintf(sentry, "{\t\tTotal free: %6d KB %d%%}\n", + mp.fordblks >> 10, percent(mp.fordblks, mp.arena)); + storeAppendPrintf(sentry, "{\t\tFree, trimmable space: %6d KB %d%% of total free}\n", + mp.keepcost >> 10, percent(mp.keepcost, mp.fordblks)); + storeAppendPrintf(sentry, "{\tAllocation via mmap()}\n"); + storeAppendPrintf(sentry, "{\t\tTotal allocated: %6d KB %6d regions}\n", + mp.hblkhd >> 10, mp.hblks); + t = mp.hblkhd + mp.arena; + storeAppendPrintf(sentry, "{\tTotal allocation:\t %6d KB}\n", + t >> 10); +#endif #if HAVE_EXT_MALLINFO storeAppendPrintf(sentry, "{\tmax size of small blocks:\t%d}\n", mp.mxfast); storeAppendPrintf(sentry, "{\tnumber of small blocks in a holding block:\t%d}\n",