这是indexloc提供的服务,不要输入任何密码
Skip to content

Consider limiting buffer sizes to multiples of 4 bytes #1999

@kainino0x

Description

@kainino0x

Buffers can currently be any size, but there are many places where there are 4 byte limitations anyway:

  • mapAsync size (which means mapAsync with default args fails on such buffers)
  • size of mappedAtCreation buffers
  • copyBufferToBuffer sizes

Additionally it can add complexity in initialization because it's required for those last 1-3 bytes to be initialized, but copyBufferToBuffer can't be used to initialize them.

So, they're of pretty minimal use. Why not just disallow unaligned sizes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions