Added allocation functions for opaque entity type.