Skip to content

buffer.kMaxLength returning different value than buffer.constants.MAX_LENGTH #14819

Description

@abegines
  • Version:
    v8.2.1

  • Platform:
    win32 (10.0.14393)

  • Subsystem:
    Buffer

The documentation says...

For buffer.kMaxLength
The largest size allowed for a single Buffer instance
An alias for buffer.constants.MAX_LENGTH

For buffer.constants.MAX_LENGTH:
The largest size allowed for a single Buffer instance
On 32-bit architectures, this value is (2^30)-1 (~1GB). On 64-bit architectures, this value is (2^31)-1 (~2GB).
This value is also available as buffer.kMaxLength.

But when you call the functions, they return different values...

buffer.kMaxLength
2147483647
buffer.constants.MAX_LENGTH
268435440

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.confirmed-bugIssues and PRs for confirmed bugs.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions