MCPcopy Index your code
hub / github.com/nodejs/node / CreateGsab

Function CreateGsab

deps/v8/test/mjsunit/typedarray-growablesharedarraybuffer.js:550–559  ·  view source on GitHub ↗
(buffer_byte_length, ctor)

Source from the content-addressed store, hash-verified

548
549// Helpers for iteration tests.
550function CreateGsab(buffer_byte_length, ctor) {
551 const gsab = CreateGrowableSharedArrayBuffer(buffer_byte_length,
552 2 * buffer_byte_length);
553 // Write some data into the array.
554 let ta_write = new ctor(gsab);
555 for (let i = 0; i < buffer_byte_length / ctor.BYTES_PER_ELEMENT; ++i) {
556 WriteToTypedArray(ta_write, i, i % 128);
557 }
558 return gsab;
559}
560
561function TestIterationAndGrow(ta, expected, gsab, grow_after,
562 new_byte_length) {

Calls 2

WriteToTypedArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…