diff options
author | Trevor Norris <trev.norris@gmail.com> | 2015-05-26 12:42:14 -0600 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-08-04 11:56:10 -0700 |
commit | 63da0dfd3a4460e117240e84b57af2137469497e (patch) | |
tree | 4806693f7d89ba36ebbe4ff1ab5f34e1b3cf90ea /test/parallel/test-buffer-slice.js | |
parent | 23be6ca189e1ebad24a814ed1c8c1c241fee354e (diff) | |
download | node-new-63da0dfd3a4460e117240e84b57af2137469497e.tar.gz |
buffer: implement Uint8Array backed Buffer
With V8 4.4 removing the external array data API currently used by
Buffer, the new implementation uses the Uint8Array to back Buffer.
Buffers now have a maximum size of Smi::kMaxLength, as defined by V8.
Which is ~2 GB on 64 bit and ~1 GB on 32 bit.
The flag --use-old-buffer allows using the old Buffer implementation.
This flag will be removed once V8 4.4 has landed.
The two JS Buffer implementations have been split into two files for
simplicity.
Use getter to return expected .parent/.offset values for backwards
compatibility.
PR-URL: https://github.com/nodejs/io.js/pull/1825
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/parallel/test-buffer-slice.js')
-rw-r--r-- | test/parallel/test-buffer-slice.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/test/parallel/test-buffer-slice.js b/test/parallel/test-buffer-slice.js deleted file mode 100644 index 53434eab8e..0000000000 --- a/test/parallel/test-buffer-slice.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var Buffer = require('buffer').Buffer; - -var buff = new Buffer(Buffer.poolSize + 1); -var slicedBuffer = buff.slice(); -assert.equal(slicedBuffer.parent, - buff, - 'slicedBufffer should have its parent set to the original ' + - ' buffer'); |