GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: fixed misinformation in Buffer.allocUnsafe method by mertcanaltin · Pull Request #50686 · nodejs/node

Conversation

@mertcanaltin

@mertcanaltin mertcanaltin commented Nov 12, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

issue: #50635

Changes Made:
Corrected the documentation regarding Buffer.allocUnsafe method by adding missing information. The discrepancy was identified in the logic for pre-allocating an internal Buffer. The documentation stated:

... only when size is less than or equal to Buffer.poolSize >> 1 (floor of Buffer.poolSize divided by two).

However, the actual code implementation uses:

if (size < (Buffer.poolSize >>> 1)) {

I have updated the documentation to accurately reflect the code logic.

Affected URL(s):

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mert.altin
doc: fixed misinformation in Buffer.allocUnsafe method
ed451c6
@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to Node.js documentation. labels Nov 12, 2023
jasnell
jasnell approved these changes Nov 12, 2023
View reviewed changes
peixotoleonardo
peixotoleonardo reviewed Nov 12, 2023
View reviewed changes
Comment thread doc/api/buffer.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mertcanaltin @peixotoleonardo
Update buffer.md
03f6ba5
Co-authored-by: Leonardo Peixoto <[email protected]>
marco-ippolito
marco-ippolito approved these changes Nov 13, 2023
View reviewed changes
@marco-ippolito marco-ippolito added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 13, 2023
@aduh95
aduh95 merged commit 2d1bc3d into nodejs:main Nov 15, 2023
@aduh95

aduh95 commented Nov 15, 2023

Copy link
Copy Markdown
Contributor

Landed in 2d1bc3d

mertcanaltin reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request Nov 23, 2023
@mertcanaltin @targos
doc: fix Buffer.allocUnsafe documentation
6b7403c
PR-URL: #50686
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Nov 28, 2023
v21.3.0 proposal #50954
Merged
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
@mertcanaltin @UlisesGascon
doc: fix Buffer.allocUnsafe documentation
4648aa4
PR-URL: #50686
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
v20.11.0 proposal #51124
Merged
UlisesGascon pushed a commit that referenced this pull request Dec 19, 2023
@mertcanaltin @UlisesGascon
doc: fix Buffer.allocUnsafe documentation
aeaf96d
PR-URL: #50686
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@marco-ippolito marco-ippolito marco-ippolito approved these changes
+1 more reviewer
@peixotoleonardo peixotoleonardo peixotoleonardo left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to Node.js documentation.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@mertcanaltin @aduh95 @jasnell @marco-ippolito @peixotoleonardo @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.