Home
last modified time | relevance | path

Searched refs:buffer_size_ (Results 1 – 4 of 4) sorted by relevance

/system/keymaster/android_keymaster/
Dserializable.cpp80 size_t new_size = buffer_size_ + size - available_write(); in reserve()
85 memset_s(buffer_.get(), 0, buffer_size_); in reserve()
87 buffer_size_ = new_size; in reserve()
99 buffer_size_ = size; in Reinitialize()
112 buffer_size_ = data_len; in Reinitialize()
115 write_position_ = buffer_size_; in Reinitialize()
120 assert(buffer_size_ >= write_position_); in available_write()
121 return buffer_size_ - write_position_; in available_write()
125 assert(buffer_size_ >= write_position_); in available_read()
156 if (!copy_size_and_data_from_buf(buf_ptr, end, &buffer_size_, &buffer_)) { in Deserialize()
[all …]
/system/extras/simpleperf/
DRecordReadThread.cpp36 : read_head_(0), write_head_(0), buffer_size_(buffer_size), buffer_(new char[buffer_size]) { in RecordBuffer()
42 size_t write_tail = read_head > 0 ? read_head - 1 : buffer_size_ - 1; in GetFreeSize()
46 return buffer_size_ - write_head + write_tail; in GetFreeSize()
52 size_t write_tail = read_head > 0 ? read_head - 1 : buffer_size_ - 1; in AllocWriteSpace()
58 } else if (write_head + record_size > buffer_size_) { in AllocWriteSpace()
63 if (buffer_size_ - write_head >= sizeof(perf_event_header)) { in AllocWriteSpace()
68 cur_write_record_size_ += buffer_size_ - write_head; in AllocWriteSpace()
76 write_head = (write_head + cur_write_record_size_) % buffer_size_; in FinishWrite()
88 if (buffer_size_ - read_head < sizeof(header) || in GetCurrentRecord()
91 cur_read_record_size_ += buffer_size_ - read_head; in GetCurrentRecord()
[all …]
DRecordReadThread.h42 size_t size() const { return buffer_size_; } in size()
62 const size_t buffer_size_; variable
/system/keymaster/include/keymaster/
Dserializable.h207 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