mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-16 18:56:54 +02:00
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:
@@ -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;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user