Closed
Description
The only way to indicate failure in in-place allocation is to have your InPlace
implementer return a Result
from finalize()
. However, most failures in in-place allocation will occur when there is insufficient space in the Placer
to make a place. The implementation of Placer
for ExchangeHeapSingleton
in std sidesteps this issue by panicking when there isn't sufficient heap space, but that is hardly an acceptable solution for every implementation of in-place allocation.
Error handling for in-place allocation could become a little weird if every allocation can fail unexpectedly.