Skip to content

Should ArrayAllocError include an Oom variant? #2225

Description

@workingjubilee

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions