summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-07-23 18:36:28 +0200
committerRyan <ry@tinyclouds.org>2009-07-23 18:36:28 +0200
commit646829262f2c33a84d1d4b892b0934e0ed93ba7f (patch)
treed0e19c5c731b6731a7694bbd269bfa88954e4525 /src
parentdd1750f5730195ea6dfa70bf2b2d2ac47d83553b (diff)
downloadnodejs-646829262f2c33a84d1d4b892b0934e0ed93ba7f.tar.gz
nodejs-646829262f2c33a84d1d4b892b0934e0ed93ba7f.tar.bz2
nodejs-646829262f2c33a84d1d4b892b0934e0ed93ba7f.zip
Fix evnet_buf size calculation for V8::AdjustAmountOfExternalAllocatedMemory().
Diffstat (limited to 'src')
-rw-r--r--src/node.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node.cc b/src/node.cc
index dd05fb9a3..c764a5761 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -26,7 +26,8 @@ using namespace std;
static void
buf_free (evnet_buf *b)
{
- V8::AdjustAmountOfExternalAllocatedMemory(-b->len);
+ size_t total = sizeof(evnet_buf) + b->len;
+ V8::AdjustAmountOfExternalAllocatedMemory(-total);
free(b);
}