There's a few reasons that this might make sense to do, including
- People can make arbitrarily limited memory contexts and may want to deliberately use that to constrain a set of array allocations without immediately failing the current transaction if those don't work out.
- It may simply provide perf benefits due to being able to bypass some error-handling overhead.
If the answer is "Yes", then new_empty should be changed to return Result (because even such a tiny allocation can error) and the allocation error risk should also inform the relevant MemCx APIs
There's a few reasons that this might make sense to do, including
If the answer is "Yes", then
new_emptyshould be changed to returnResult(because even such a tiny allocation can error) and the allocation error risk should also inform the relevantMemCxAPIs