Skip to content

Add Alignment Property #3

@fpedd

Description

@fpedd
  • Add the alignment property to the primitive.
  • Add an alignment checking utility function: A way for allocators to quickly check if any allocations have non-trivial alignment requirements, so they can error out early if they don't support them
  • Post-hoc alignment enforcement function: Add a function that takes already-allocated allocations and adjusts offsets to satisfy alignment, even if it creates gaps/increases memory use.
  • Port allocators over to support alignment

Open questions:

  • Where do alignments belong (Memory, Pool, Allocation)?
  • Should we enforce a power-of-two constraint?

Reference: https://gist.github.com/fpedd/6cf169487e994eb63e54e535f4f3cea9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions