Added support for stateful allocator