This allows `graceful-fs` to evaluate `fs` source
without access to internals.
This is a temporary workaround that makes npm work.
See: https://github.com/isaacs/node-graceful-fs/issues/41
Fixes: https://github.com/nodejs/io.js/issues/1898
PR-URL: https://github.com/nodejs/io.js/pull/1903
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
const Writable = Stream.Writable;
const kMinPoolSpace = 128;
-const kMaxLength = require('internal/smalloc').kMaxLength;
+const kMaxLength = process.binding('smalloc').kMaxLength;
const O_APPEND = constants.O_APPEND || 0;
const O_CREAT = constants.O_CREAT || 0;