add a handler for the heap state
reverted license change from 0634f21542cfaf9a70c85e2154bc88435967fa9c