summaryrefslogtreecommitdiffstats
path: root/include/framework
diff options
context:
space:
mode:
Diffstat (limited to 'include/framework')
-rw-r--r--include/framework/interface/Record.h12
-rw-r--r--include/framework/structure/MutableBuffer.h5
2 files changed, 13 insertions, 4 deletions
diff --git a/include/framework/interface/Record.h b/include/framework/interface/Record.h
index 5b9f307..f4105c6 100644
--- a/include/framework/interface/Record.h
+++ b/include/framework/interface/Record.h
@@ -97,9 +97,17 @@ template <typename K, typename V>
struct Record {
K key;
V value;
- uint32_t header = 0;
- inline bool operator<(const Record& other) const {
+ Record &operator=(const Record &other) {
+ this->key = K();
+
+ this->key = other.key;
+ this->value = other.value;
+
+ return *this;
+ }
+
+ inline bool operator<(const Record& other) const {
return key < other.key || (key == other.key && value < other.value);
}
diff --git a/include/framework/structure/MutableBuffer.h b/include/framework/structure/MutableBuffer.h
index c0c87cc..1ed0200 100644
--- a/include/framework/structure/MutableBuffer.h
+++ b/include/framework/structure/MutableBuffer.h
@@ -50,7 +50,8 @@ public:
, m_tail(0)
, m_head({0, 0})
, m_old_head({high_watermark, 0})
- , m_data((Wrapped<R> *) psudb::sf_aligned_alloc(CACHELINE_SIZE, m_cap * sizeof(Wrapped<R>)))
+ //, m_data((Wrapped<R> *) psudb::sf_aligned_alloc(CACHELINE_SIZE, m_cap * sizeof(Wrapped<R>)))
+ , m_data(new Wrapped<R>[m_cap]())
, m_tombstone_filter(new psudb::BloomFilter<R>(BF_FPR, m_hwm, BF_HASH_FUNCS))
, m_tscnt(0)
, m_old_tscnt(0)
@@ -61,7 +62,7 @@ public:
}
~MutableBuffer() {
- free(m_data);
+ delete[] m_data;
delete m_tombstone_filter;
}