Home
last modified time | relevance | path

Searched refs:allocUnsafe (Results 1 – 25 of 153) sorted by relevance

1234567

/third_party/node/test/parallel/
Dtest-fs-read-type.js26 Buffer.allocUnsafe(expected.length),
39 Buffer.allocUnsafe(expected.length),
51 Buffer.allocUnsafe(expected.length),
65 Buffer.allocUnsafe(expected.length),
80 Buffer.allocUnsafe(expected.length),
94 Buffer.allocUnsafe(expected.length),
106 Buffer.allocUnsafe(expected.length),
113 Buffer.allocUnsafe(expected.length),
139 Buffer.allocUnsafe(expected.length),
151 Buffer.allocUnsafe(expected.length),
[all …]
Dtest-buffer-read.js68 () => Buffer.allocUnsafe(8).readFloatBE(0xffffffff), OOR_ERROR);
71 () => Buffer.allocUnsafe(8).readFloatLE(0xffffffff), OOR_ERROR);
75 () => Buffer.allocUnsafe(8).readFloatBE(-1), OOR_ERROR);
77 () => Buffer.allocUnsafe(8).readFloatLE(-1), OOR_ERROR);
81 const buf = Buffer.allocUnsafe(0);
90 const buf = Buffer.allocUnsafe(bit / 8 - 1);
Dtest-buffer-fill.js9 const buf1 = Buffer.allocUnsafe(SIZE);
10 const buf2 = Buffer.allocUnsafe(SIZE);
45 assert.strictEqual(Buffer.allocUnsafe(1).fill(0).fill('\u0222')[0], 0xc8);
96 assert.strictEqual(Buffer.allocUnsafe(1).fill('\u0222', 'ucs2')[0], 0x22);
116 const buf = Buffer.allocUnsafe(SIZE);
125 const buf = Buffer.allocUnsafe(SIZE);
172 const buf2Fill = Buffer.allocUnsafe(1).fill(2);
177 const hexBufFill = Buffer.allocUnsafe(2).fill(0).fill('0102', 'hex');
230 const b = Buffer.allocUnsafe(size);
295 () => Buffer.allocUnsafe(8).fill('a', -1),
[all …]
Dtest-buffer-alloc.js16 const b = Buffer.allocUnsafe(1024);
30 const c = Buffer.allocUnsafe(512);
95 Buffer.allocUnsafe(0);
211 const b = Buffer.allocUnsafe(5);
229 const buffer = Buffer.allocUnsafe(32);
237 const a = Buffer.allocUnsafe(8);
372 let b = Buffer.allocUnsafe(1024);
384 b = Buffer.allocUnsafe(1024);
567 const b = Buffer.allocUnsafe(64);
582 const b = Buffer.allocUnsafe(64);
[all …]
Dtest-buffer-copy.js6 const b = Buffer.allocUnsafe(1024);
7 const c = Buffer.allocUnsafe(512);
125 const bb = Buffer.allocUnsafe(10);
143 () => Buffer.allocUnsafe(5).copy(Buffer.allocUnsafe(5), -1, 0),
154 () => Buffer.allocUnsafe(5).copy(Buffer.allocUnsafe(5), 0, -1),
163 () => Buffer.allocUnsafe(5).copy(Buffer.allocUnsafe(5), 0, 100),
Dtest-buffer-over-max-length.js19 assert.throws(() => Buffer.allocUnsafe((-1 >>> 0) + 2), bufferMaxSizeMsg);
25 assert.throws(() => Buffer.allocUnsafe(kMaxLength + 1), bufferMaxSizeMsg);
29 assert.throws(() => Buffer.allocUnsafe(0x100000001), bufferMaxSizeMsg);
30 assert.throws(() => Buffer.allocUnsafe(0xFFFFFFFFF), bufferMaxSizeMsg);
Dtest-buffer-no-negative-allocation.js25 assert.throws(() => Buffer.allocUnsafe(-Buffer.poolSize), msg);
26 assert.throws(() => Buffer.allocUnsafe(-100), msg);
27 assert.throws(() => Buffer.allocUnsafe(-1), msg);
28 assert.throws(() => Buffer.allocUnsafe(NaN), msg);
Dtest-stream-unshift-read-race.js38 const data = Buffer.allocUnsafe(chunks * hwm + Math.ceil(hwm / 2));
71 r.unshift(Buffer.allocUnsafe(1));
75 r.push(Buffer.allocUnsafe(1));
Dtest-buffer-safe-unsafe.js17 Buffer.allocUnsafe(10);
23 Buffer.allocUnsafe(10);
Dtest-stream-write-final.js23 w.write(Buffer.allocUnsafe(1));
24 w.end(Buffer.allocUnsafe(0));
Dtest-stream2-writable.js379 w.write(Buffer.allocUnsafe(1));
401 w.write(Buffer.allocUnsafe(1));
402 w.end(Buffer.allocUnsafe(0));
457 w.write(Buffer.allocUnsafe(1));
458 w.end(Buffer.allocUnsafe(0));
Dtest-buffer-inspect.js30 let b = Buffer.allocUnsafe(4);
41 b = Buffer.allocUnsafe(2);
Dtest-fs-write-stream-err.js71 stream.write(Buffer.allocUnsafe(256), function() {
73 stream.write(Buffer.allocUnsafe(256), common.mustCall(function(err_) {
Dtest-fs-read.js48 test(Buffer.allocUnsafe(expected.length),
49 Buffer.allocUnsafe(expected.length),
Dtest-stream2-pipe-error-handling.js34 source.push(Buffer.allocUnsafe(n));
74 source.push(Buffer.allocUnsafe(n));
Dtest-buffer-writedouble.js8 const buffer = Buffer.allocUnsafe(16);
89 const small = Buffer.allocUnsafe(1);
Dtest-buffer-writefloat.js8 const buffer = Buffer.allocUnsafe(8);
71 const small = Buffer.allocUnsafe(1);
Dtest-buffer-write.js82 const x = Buffer.allocUnsafe(4).fill(0);
83 const y = Buffer.allocUnsafe(4).fill(1);
/third_party/node/deps/npm/node_modules/socks/build/common/
Dreceivebuffer.js6 this.buffer = Buffer.allocUnsafe(size);
19 …this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.leng…
35 const value = Buffer.allocUnsafe(length);
/third_party/node/benchmark/buffers/
Dbuffer-copy.js17 const source = Buffer.allocUnsafe(bytes);
18 const target = Buffer.allocUnsafe(bytes);
/third_party/node/deps/npm/node_modules/safer-buffer/
Ddangerous.js34 if (!Dangereous.allocUnsafe) {
35 Dangereous.allocUnsafe = function (size) { function
/third_party/node/test/sequential/
Dtest-net-response-size.js59 const alot = Buffer.allocUnsafe(1024);
60 const alittle = Buffer.allocUnsafe(1);
/third_party/node/deps/npm/node_modules/safe-buffer/
Dindex.js12 if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
53 SafeBuffer.allocUnsafe = function (size) { function in SafeBuffer
/third_party/node/doc/api/
Dbuffer.md34 const buf3 = Buffer.allocUnsafe(10);
67 const buf3 = Buffer.allocUnsafe(10);
741 [`Buffer.allocUnsafe()`][] but ensures that the newly created `Buffer` instance
747 ### Static method: `Buffer.allocUnsafe(size)`
779 const buf = Buffer.allocUnsafe(10);
793 const buf = Buffer.allocUnsafe(10);
808 `Buffer` instances created using [`Buffer.allocUnsafe()`][], [`Buffer.from(array)`][],
813 calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
815 pool, while `Buffer.allocUnsafe(size).fill(fill)` _will_ use the internal
818 additional performance that [`Buffer.allocUnsafe()`][] provides.
[all …]
/third_party/node/deps/npm/node_modules/clone/
Dclone.js66 if (Buffer.allocUnsafe) {
68 child = Buffer.allocUnsafe(parent.length);

1234567