From 646829262f2c33a84d1d4b892b0934e0ed93ba7f Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 23 Jul 2009 18:36:28 +0200 Subject: [PATCH] Fix evnet_buf size calculation for V8::AdjustAmountOfExternalAllocatedMemory(). --- src/node.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index dd05fb9a30..c764a5761e 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); }