buffer: align chunks on 8-byte boundary
authorFedor Indutny <fedor@indutny.com>
Wed, 11 Mar 2015 14:17:53 +0000 (07:17 -0700)
committerFedor Indutny <fedor@indutny.com>
Wed, 11 Mar 2015 18:39:57 +0000 (11:39 -0700)
commit07c066724ced98adcae3f9f97cfcd301b138eb18
treea0c19e8c664cca4a496129a2e986f12d9c028a72
parentd33a647b4bdcbf596aaad0589090dcee0fbf0297
buffer: align chunks on 8-byte boundary

When slicing global pool - ensure that the underlying buffer's data ptr
is 8-byte alignment to do not ruin expectations of 3rd party C++ addons.

NOTE: 0.10 node.js always returned aligned pointers and io.js should do
this too for compatibility.

PR-URL: https://github.com/iojs/io.js/pull/1126
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Bert Belder <bertbelder@gmail.com>
lib/buffer.js