summaryrefslogtreecommitdiff
path: root/cpp/zone.hpp.erb
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:56 +0000
committerfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:56 +0000
commit97bc0441b1204b3eb38f9cfc03f90e5ee675ab9a (patch)
treef83049ca457011380e907d6483e435cd2babc740 /cpp/zone.hpp.erb
parent94cbe54cf377f16bcc18b80d8b6f81eefd50e723 (diff)
downloadmsgpack-python-97bc0441b1204b3eb38f9cfc03f90e5ee675ab9a.tar.gz
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
Diffstat (limited to 'cpp/zone.hpp.erb')
-rw-r--r--cpp/zone.hpp.erb11
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/zone.hpp.erb b/cpp/zone.hpp.erb
index 40ce694..5c0e0d8 100644
--- a/cpp/zone.hpp.erb
+++ b/cpp/zone.hpp.erb
@@ -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;