Fix evnet_buf size calculation for V8::AdjustAmountOfExternalAllocatedMemory().

pull/22966/head
Ryan 2009-07-23 18:36:28 +02:00
parent dd1750f573
commit 646829262f
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ using namespace std;
static void static void
buf_free (evnet_buf *b) buf_free (evnet_buf *b)
{ {
V8::AdjustAmountOfExternalAllocatedMemory(-b->len); size_t total = sizeof(evnet_buf) + b->len;
V8::AdjustAmountOfExternalAllocatedMemory(-total);
free(b); free(b);
} }