migrate to use Allocator provided by CPL