lang/c/msgpack: C++ binding: enlarged chunk size of zone

git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@58 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
frsyuki
2009-02-15 09:09:56 +00:00
parent 94cbe54cf3
commit 97bc0441b1
4 changed files with 26 additions and 17 deletions

View File

@@ -8,12 +8,15 @@
#include <stdexcept>
#ifndef MSGPACK_ZONE_CHUNK_SIZE
#define MSGPACK_ZONE_CHUNK_SIZE 64
#define MSGPACK_ZONE_CHUNK_SIZE 8*1024
#endif
namespace msgpack {
static const size_t ZONE_CHUNK_SIZE = MSGPACK_ZONE_CHUNK_SIZE;
class zone {
public:
zone() : m_used(0) { }
@@ -110,11 +113,7 @@ private:
char data[MAX_OBJECT_SIZE];
};
struct chunk_t {
cell_t cells[MSGPACK_ZONE_CHUNK_SIZE];
};
typedef std::vector<chunk_t*> pool_t;
typedef std::vector<cell_t*> pool_t;
pool_t m_pool;