Searched refs:buffer_size_ (Results 1 – 4 of 4) sorted by relevance
/system/keymaster/android_keymaster/ |
D | serializable.cpp | 72 size_t new_size = buffer_size_ + size - available_write(); in reserve() 77 memset_s(buffer_.get(), 0, buffer_size_); in reserve() 79 buffer_size_ = new_size; in reserve() 91 buffer_size_ = size; in Reinitialize() 104 buffer_size_ = data_len; in Reinitialize() 107 write_position_ = buffer_size_; in Reinitialize() 112 assert(buffer_size_ >= write_position_); in available_write() 113 return buffer_size_ - write_position_; in available_write() 117 assert(buffer_size_ >= write_position_); in available_read() 148 if (!copy_size_and_data_from_buf(buf_ptr, end, &buffer_size_, &buffer_)) { in Deserialize() [all …]
|
/system/extras/simpleperf/ |
D | RecordReadThread.cpp | 34 : read_head_(0), write_head_(0), buffer_size_(buffer_size), buffer_(new char[buffer_size]) { in RecordBuffer() 40 size_t write_tail = read_head > 0 ? read_head - 1 : buffer_size_ - 1; in GetFreeSize() 44 return buffer_size_ - write_head + write_tail; in GetFreeSize() 50 size_t write_tail = read_head > 0 ? read_head - 1 : buffer_size_ - 1; in AllocWriteSpace() 56 } else if (write_head + record_size > buffer_size_) { in AllocWriteSpace() 61 if (buffer_size_ - write_head >= sizeof(perf_event_header)) { in AllocWriteSpace() 66 cur_write_record_size_ += buffer_size_ - write_head; in AllocWriteSpace() 74 write_head = (write_head + cur_write_record_size_) % buffer_size_; in FinishWrite() 86 if (buffer_size_ - read_head < sizeof(header) || in GetCurrentRecord() 89 cur_read_record_size_ += buffer_size_ - read_head; in GetCurrentRecord() [all …]
|
D | RecordReadThread.h | 42 size_t size() const { return buffer_size_; } in size() 61 const size_t buffer_size_; variable
|
/system/keymaster/include/keymaster/ |
D | serializable.h | 207 Buffer() : buffer_(nullptr), buffer_size_(0), read_position_(0), write_position_(0) {} in Buffer() 229 size_t buffer_size() const { return buffer_size_; } in buffer_size() 243 if (static_cast<size_t>(write_position_ + distance) <= buffer_size_) { in advance_write() 260 size_t buffer_size_; variable
|