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 — test: change buffer offset to accommodate V8 BackingStore · nodejs/node@18cd002

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/addons/buffer-free-callback
    • test.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/addons/buffer-free-callback/test.js‎

Copy file name to clipboardExpand all lines: test/addons/buffer-free-callback/test.js
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,24 @@ function check(size, alignment, offset) {
1616
global.gc();
1717
}
1818

19+
// NOTE: If adding more check() test cases,
20+
// be sure to not duplicate alignment/offset.
21+
// Refs: https://github.com/nodejs/node/issues/31061#issuecomment-568612283
22+
1923
check(64, 1, 0);
2024

2125
// Buffers can have weird sizes.
22-
check(97, 1, 0);
26+
check(97, 1, 1);
2327

2428
// Buffers can be unaligned
2529
check(64, 8, 0);
2630
check(64, 16, 0);
2731
check(64, 8, 1);
2832
check(64, 16, 1);
29-
check(97, 8, 1);
30-
check(97, 16, 1);
3133
check(97, 8, 3);
3234
check(97, 16, 3);
35+
check(97, 8, 5);
36+
check(97, 16, 5);
3337

3438
// Empty ArrayBuffer does not allocate data, worth checking
35-
check(0, 1, 0);
39+
check(0, 1, 2);

0 commit comments

Comments
0 (0)
You are visitor 01402520 — 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.