]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2100] use offset pointer for the underlying tree
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 9 Aug 2012 00:46:11 +0000 (17:46 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 9 Aug 2012 00:46:11 +0000 (17:46 -0700)
src/lib/datasrc/memory/zone_table.cc
src/lib/datasrc/memory/zone_table.h

index fdcf9b36245a6b2d684d30f81cdfd3046668133b..b90ba484020a69440ea1fb5272a18979493bee15 100644 (file)
@@ -73,7 +73,7 @@ ZoneTable::create(util::MemorySegment& mem_sgmt) {
 
 void
 ZoneTable::destroy(util::MemorySegment& mem_sgmt, ZoneTable* ztable) {
-    ZoneTableTree::destroy(mem_sgmt, ztable->zones_);
+    ZoneTableTree::destroy(mem_sgmt, ztable->zones_.get());
     mem_sgmt.deallocate(ztable, sizeof(ZoneTable));
 }
 
index 8ac3ee8c2c6b3b5098c54d20ecf62dc4a748e9e1..636d79b0292a5a3273e3e635f7e96a2a3447796f 100644 (file)
@@ -20,6 +20,8 @@
 #include <datasrc/result.h>
 #include <datasrc/memory/domaintree.h>
 
+#include <boost/interprocess/offset_ptr.hpp>
+
 namespace isc {
 namespace dns {
 class Name;
@@ -174,7 +176,7 @@ public:
     FindResult findZone(const isc::dns::Name& name) const;
 
 private:
-    ZoneTableTree* zones_;
+    boost::interprocess::offset_ptr<ZoneTableTree> zones_;
 };
 }
 }