Change function signature of allocators for dict