Hi,
To build on what Andy said, we've been also working on a design for a feature
that seems to match your exact use case:
https://github.com/pmem/issues/issues/415When implemented, this will allow you to perform a fast volatile allocation,
which we call reservation (because in truth, it only reserves the pmem storage,
and doesn't modify any related state), hold it for any arbitrary amount of time,
and once ready, publish it. The planned API will also allow you to cancel any
reservations, so that if other resources become unavailable, you are not stuck
with not needed memory.
If you have any suggestions, feel free to leave a comment on the issue I linked.
Piotrek