xrestop
A top for the X server: it lists every connected client and how many windows, pixmaps and other objects it is holding in the server's memory.
When the X server balloons to several hundred megabytes, it is rarely the server's own fault. Pixmaps, graphics contexts and fonts that a client creates live in the server, not the client, so they never show up in the client's figures in top. xrestop, written by Matthew Allum in the early 2000s, asks the X-Resource extension for resource counts and estimated pixmap memory per client and sorts the worst offenders to the top.
The classic find: a browser or panel applet that creates a fresh pixmap for every icon update and never frees the old one. The PID column only works if the client has set _NET_WM_PID; otherwise you make do with a resource id and a window title.