Skip to content

Buffer constructor not allocating at pool #42821

@maximelkin

Description

@maximelkin

Affected URL(s)

https://nodejs.org/dist/latest/docs/api/buffer.html#static-method-bufferallocunsafesize

Description of the problem

The Buffer module pre-allocates an internal Buffer instance of size Buffer.poolSize that is used as a pool for the fast allocation of new Buffer instances created using ...blah blah..., and the deprecated new Buffer(size) constructor ...blah blah..

This behaviour changed at 7eb1b46 (v8.0.0), new Buffer(size) will never use preallocated pool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.docIssues and PRs related to the documentations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions