[PD-dev] Allocating memory in externals