port to the new allocator API