Well ok. Lets look at this logically.
First off, what OS, compiler, and version of AFKMud are you trying to use? I'm assuming some form of linux since valgrind was available to you.
When the mud gets itself stuck in this situation, have you tried to do a "gdb attach pid#" where pid# is the process ID? Attaching to a running process will give you some idea of what the mud is doing at the time the memory spike starts.