summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/gras/detail/sbuffer.hpp3
-rw-r--r--include/gras/sbuffer.hpp3
-rw-r--r--lib/sbuffer.cpp1
3 files changed, 6 insertions, 1 deletions
diff --git a/include/gras/detail/sbuffer.hpp b/include/gras/detail/sbuffer.hpp
index c3dab6b..0d68ebc 100644
--- a/include/gras/detail/sbuffer.hpp
+++ b/include/gras/detail/sbuffer.hpp
@@ -39,7 +39,8 @@ GRAS_FORCE_INLINE void intrusive_ptr_release(SBufferImpl *impl)
GRAS_FORCE_INLINE SBuffer::SBuffer(void):
offset(0),
- length(0)
+ length(0),
+ last(NULL)
{
//NOP
}
diff --git a/include/gras/sbuffer.hpp b/include/gras/sbuffer.hpp
index b82aff1..2d63e50 100644
--- a/include/gras/sbuffer.hpp
+++ b/include/gras/sbuffer.hpp
@@ -116,6 +116,9 @@ struct GRAS_API SBuffer : boost::intrusive_ptr<SBufferImpl>
//! The number of valid bytes past offset
size_t length;
+ //! Pointer to the end of the last buffer
+ void *last;
+
//! Get the affinity of the memory
long get_affinity(void) const;
diff --git a/lib/sbuffer.cpp b/lib/sbuffer.cpp
index c1f3b75..03f87b1 100644
--- a/lib/sbuffer.cpp
+++ b/lib/sbuffer.cpp
@@ -34,6 +34,7 @@ SBufferConfig::SBufferConfig(void)
memory = NULL;
length = 0;
affinity = -1;
+ user_index = ~0;
}
static void numa_mem_deleter(SBuffer &buff)