How can I figure out where memory is being used?

I found it: it was a massive set of WordPress cron jobs that I had inadvertently accumulated. The technique I used was to keep removing things from the database in the clone that weren’t in the blank install, watching the memory in query monitor to see what dropped it.