Get and set state pointer
Merge branch 'master' of https://github.com/mikaeleiman/rmalloc