Skip to content

Const flags describing allocator propertiesΒ #124

@the8472

Description

@the8472

It would be useful if allocators had an associated constant of flags describing their properties, such as

  • support for alignment-changing realloc (posix realloc doesn't, jemalloc does)
  • does realloc try to avoid memcpy (doing virtual memory schenanigans)
  • whether deallocation does anything (vs. an arena that drops all allocations at once)
  • support for zero-length allocations
  • if alloc_zeroed is any different from allocate
  • do realloc/dealloc care about the layout information being correct
  • etc.

Containers can then choose to optimize their behavior based on those properties.

(from #120 (comment))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions