lang/c/msgpack: C++ binding: added bench.cpp

git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@57 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
frsyuki
2009-02-15 09:09:56 +00:00
parent 7e6b55a718
commit 94cbe54cf3
3 changed files with 191 additions and 7 deletions

View File

@@ -85,8 +85,8 @@ void unpacker::expand_buffer(size_t len)
void* tmp = malloc(next_size);
if(!tmp) { throw std::bad_alloc(); }
memcpy(tmp, m_buffer, m_used);
free(m_buffer);
m_buffer = tmp;
m_free = next_size - m_used;