Lines Matching refs:size
28 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { in copy_from_buf() argument
29 if (end < *buf_ptr + size) in copy_from_buf()
31 memcpy(dest, *buf_ptr, size); in copy_from_buf()
32 *buf_ptr += size; in copy_from_buf()
36 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, in copy_size_and_data_from_buf() argument
38 if (!copy_uint32_from_buf(buf_ptr, end, size) || *buf_ptr + *size > end) { in copy_size_and_data_from_buf()
41 if (*size == 0) { in copy_size_and_data_from_buf()
45 dest->reset(new uint8_t[*size]); in copy_size_and_data_from_buf()
48 return copy_from_buf(buf_ptr, end, dest->get(), *size); in copy_size_and_data_from_buf()
51 bool Buffer::reserve(size_t size) { in reserve() argument
52 if (available_write() < size) { in reserve()
53 size_t new_size = buffer_size_ + size - available_write(); in reserve()
67 bool Buffer::Reinitialize(size_t size) { in Reinitialize() argument
69 buffer_.reset(new uint8_t[size]); in Reinitialize()
72 buffer_size_ = size; in Reinitialize()