smalloc: do not track external memory
authorFedor Indutny <fedor@indutny.com>
Wed, 8 Apr 2015 09:10:12 +0000 (11:10 +0200)
committerFedor Indutny <fedor@indutny.com>
Wed, 8 Apr 2015 15:10:08 +0000 (17:10 +0200)
commitff74931107598f017efc11e265c13f716dd9eab7
tree2afe31a556476677a59784b9ebf426c865556301
parent264a8f3a1b1a46d813d244e811a6f6d12ad513ac
smalloc: do not track external memory

The memory that was allocated outside of the `smalloc.cc` should not be
tracked using `AdjustAmountOfExternalAllocatedMemory`. There are no
potential issues except triggering V8's GC way too often.

In fact, `heap.js` is creating a buffer out of the pointer, and since it
doesn't know the size of the pointer - it just creates the maximum
possible `Buffer` instance with a no-op free callback and no hint.

PR-URL: https://github.com/iojs/io.js/pull/1375
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
src/smalloc.cc