Lines Matching refs:SharedBuffer
30 SharedBuffer* SharedBuffer::alloc(size_t size) in alloc()
34 LOG_ALWAYS_FATAL_IF((size >= (SIZE_MAX - sizeof(SharedBuffer))), in alloc()
37 SharedBuffer* sb = static_cast<SharedBuffer *>(malloc(sizeof(SharedBuffer) + size)); in alloc()
50 void SharedBuffer::dealloc(const SharedBuffer* released) in dealloc()
52 free(const_cast<SharedBuffer*>(released)); in dealloc()
55 SharedBuffer* SharedBuffer::edit() const in edit()
58 return const_cast<SharedBuffer*>(this); in edit()
60 SharedBuffer* sb = alloc(mSize); in edit()
68 SharedBuffer* SharedBuffer::editResize(size_t newSize) const in editResize()
71 SharedBuffer* buf = const_cast<SharedBuffer*>(this); in editResize()
75 LOG_ALWAYS_FATAL_IF((newSize >= (SIZE_MAX - sizeof(SharedBuffer))), in editResize()
78 buf = (SharedBuffer*)realloc(buf, sizeof(SharedBuffer) + newSize); in editResize()
84 SharedBuffer* sb = alloc(newSize); in editResize()
93 SharedBuffer* SharedBuffer::attemptEdit() const in attemptEdit()
96 return const_cast<SharedBuffer*>(this); in attemptEdit()
101 SharedBuffer* SharedBuffer::reset(size_t new_size) const in reset()
104 SharedBuffer* sb = alloc(new_size); in reset()
111 void SharedBuffer::acquire() const { in acquire()
115 int32_t SharedBuffer::release(uint32_t flags) const in release()