The handler of the heap state command.