7 #ifndef ZEROBUF_NONMOVINGBASEALLOCATOR_H 8 #define ZEROBUF_NONMOVINGBASEALLOCATOR_H 11 #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 = (
33 const NonMovingBaseAllocator& ) =
delete;
38 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.