7 #ifndef ZEROBUF_NONMOVINGBASEALLOCATOR_H 8 #define ZEROBUF_NONMOVINGBASEALLOCATOR_H 10 #include <zerobuf/Allocator.h> 21 ZEROBUF_API
virtual ~NonMovingBaseAllocator();
25 ZEROBUF_API
void compact(
float threshold)
final;
28 virtual void _resize(
size_t newSize) = 0;
31 NonMovingBaseAllocator(
const NonMovingBaseAllocator&) =
delete;
32 NonMovingBaseAllocator& operator=(
const NonMovingBaseAllocator&) =
delete;
37 uint8_t* _moveAllocation(
size_t index,
bool copy,
size_t newOffset,
uint8_t * updateAllocation(size_t index, bool copy, size_t size) final
Update allocation of the dynamic elem at index to have newSize bytes.
Allocator base class which does not move existing fields.
Defines export visibility macros for library ZeroBuf.
Zero-copy, zero-serialize, zero-hassle protocol buffers.
Allocator base class and interface.