*** src/backend/storage/ipc/ipc.c.orig Thu Jun 11 10:55:12 2009 --- src/backend/storage/ipc/ipc.c Mon Jul 20 13:56:06 2009 *************** *** 183,188 **** --- 183,190 ---- on_proc_exit_list[on_proc_exit_index].arg); on_proc_exit_index = 0; + + AllocSetPrintStats(); } /* ------------------ *** src/backend/utils/mmgr/aset.c.orig Thu Jun 11 10:55:25 2009 --- src/backend/utils/mmgr/aset.c Mon Jul 20 13:56:19 2009 *************** *** 255,260 **** --- 255,271 ---- #define AllocAllocInfo(_cxt, _chunk) #endif + static unsigned long allocsizes[ALLOCSET_NUM_FREELISTS]; + + void + AllocSetPrintStats() + { + int i; + + for (i = 0; i < ALLOCSET_NUM_FREELISTS; i++) + fprintf(stderr, "category %2d count %lu\n", i, allocsizes[i]); + } + /* ---------- * AllocSetFreeIndex - * *************** *** 277,282 **** --- 288,294 ---- size >>= 1; } Assert(idx < ALLOCSET_NUM_FREELISTS); + allocsizes[idx]++; } return idx;