Searched refs:byte_count (Results 1 - 25 of 29) sorted by relevance

12

/art/compiler/
H A Dbuffered_output_stream.cc26 bool BufferedOutputStream::WriteFully(const void* buffer, size_t byte_count) { argument
27 if (byte_count > kBufferSize) {
29 return out_->WriteFully(buffer, byte_count);
31 if (used_ + byte_count > kBufferSize) {
38 memcpy(&buffer_[used_], src, byte_count);
39 used_ += byte_count;
H A Dfile_output_stream.cc28 bool FileOutputStream::WriteFully(const void* buffer, size_t byte_count) { argument
29 return file_->WriteFully(buffer, byte_count);
H A Dvector_output_stream.h34 bool WriteFully(const void* buffer, size_t byte_count) { argument
37 vector_.insert(vector_.end(), &start[0], &start[byte_count]);
38 offset_ += byte_count;
40 off_t new_offset = offset_ + byte_count;
42 memcpy(&vector_[offset_], buffer, byte_count);
H A Dfile_output_stream.h32 virtual bool WriteFully(const void* buffer, size_t byte_count);
H A Dbuffered_output_stream.h34 virtual bool WriteFully(const void* buffer, size_t byte_count);
H A Doutput_stream.h45 virtual bool WriteFully(const void* buffer, size_t byte_count) = 0;
/art/runtime/base/unix_file/
H A Dnull_file.cc36 int64_t NullFile::Read(char* buf, int64_t byte_count, int64_t offset) const { argument
54 int64_t NullFile::Write(const char* buf, int64_t byte_count, int64_t offset) { argument
58 return byte_count;
H A Dstring_file.cc38 int64_t StringFile::Read(char *buf, int64_t byte_count, int64_t offset) const { argument
40 CHECK_GE(byte_count, 0);
46 const int64_t available_bytes = std::min(byte_count, GetLength() - offset);
66 int64_t StringFile::Write(const char *buf, int64_t byte_count, int64_t offset) { argument
68 CHECK_GE(byte_count, 0);
74 if (byte_count == 0) {
86 data_.replace(offset, byte_count, buf, byte_count);
87 return byte_count;
H A Drandom_access_file.h43 // Reads 'byte_count' bytes into 'buf' starting at offset 'offset' in the
45 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const = 0;
56 // Writes 'byte_count' bytes from 'buf' starting at offset 'offset' in the
60 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset) = 0;
H A Dnull_file.h39 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const;
42 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset);
H A Dstring_file.h42 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const;
45 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset);
H A Dfd_file.cc138 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const { argument
140 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset));
142 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset));
163 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { argument
165 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset));
167 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset));
181 bool FdFile::ReadFully(void* buffer, size_t byte_count) { argument
183 while (byte_count > 0) {
184 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd_, ptr, byte_count));
190 byte_count
196 WriteFully(const void* buffer, size_t byte_count) argument
[all...]
H A Dfd_file.h54 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const WARN_UNUSED;
57 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset) WARN_UNUSED;
76 bool ReadFully(void* buffer, size_t byte_count) WARN_UNUSED;
77 bool WriteFully(const void* buffer, size_t byte_count) WARN_UNUSED;
H A Dmapped_file.cc112 int64_t MappedFile::Read(char* buf, int64_t byte_count, int64_t offset) const { argument
119 std::min(byte_count, file_size_ - offset));
125 return FdFile::Read(buf, byte_count, offset);
148 int64_t MappedFile::Write(const char* buf, int64_t byte_count, int64_t offset) { argument
156 std::min(byte_count, file_size_ - offset));
163 return FdFile::Write(buf, byte_count, offset);
H A Dmapped_file.h69 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const;
76 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset);
/art/runtime/base/
H A Dhex_dump.cc55 size_t byte_count = byte_count_; local
57 while (byte_count > 0) {
71 size_t count = std::min(byte_count, 16 - gap);
104 byte_count -= count;
106 if (byte_count > 0) {
H A Dhex_dump.h32 HexDump(const void* address, size_t byte_count, bool show_actual_addresses, const char* prefix) argument
33 : address_(address), byte_count_(byte_count), show_actual_addresses_(show_actual_addresses),
/art/runtime/gc/
H A Dheap-inl.h40 size_t byte_count, AllocatorType allocator,
43 CheckPreconditionsForAllocObject(klass, byte_count);
52 if (kCheckLargeObject && UNLIKELY(ShouldAllocLargeObject(klass, byte_count))) {
53 obj = AllocLargeObject<kInstrumented, PreFenceVisitor>(self, &klass, byte_count,
70 byte_count = RoundUp(byte_count, space::BumpPointerSpace::kAlignment);
73 if (allocator == kAllocatorTypeTLAB && byte_count <= self->TlabSize()) {
74 obj = self->AllocTlab(byte_count);
83 bytes_allocated = byte_count;
88 obj = TryToAllocate<kInstrumented, false>(self, allocator, byte_count,
39 AllocObjectWithAllocator(Thread* self, mirror::Class* klass, size_t byte_count, AllocatorType allocator, const PreFenceVisitor& pre_fence_visitor) argument
183 AllocLargeObject(Thread* self, mirror::Class** klass, size_t byte_count, const PreFenceVisitor& pre_fence_visitor) argument
[all...]
H A Dheap.h194 Thread* self, mirror::Class* klass, size_t byte_count, AllocatorType allocator,
210 void CheckPreconditionsForAllocObject(mirror::Class* c, size_t byte_count)
382 size_t /*length TODO: element_count or byte_count?*/) {
634 bool ShouldAllocLargeObject(mirror::Class* c, size_t byte_count) const
646 mirror::Object* AllocLargeObject(Thread* self, mirror::Class** klass, size_t byte_count,
675 void ThrowOutOfMemoryError(Thread* self, size_t byte_count, AllocatorType allocator_type)
H A Dheap.cc934 void Heap::ThrowOutOfMemoryError(Thread* self, size_t byte_count, AllocatorType allocator_type) { argument
937 oss << "Failed to allocate a " << byte_count << " byte allocation with " << total_bytes_free
940 if (total_bytes_free >= byte_count) {
952 space->LogFragmentationAllocFailure(oss, byte_count);
3241 void Heap::CheckPreconditionsForAllocObject(mirror::Class* c, size_t byte_count) { argument
3242 CHECK(c == NULL || (c->IsClassClass() && byte_count >= sizeof(mirror::Class)) ||
3243 (c->IsVariableSize() || c->GetObjectSize() == byte_count));
3244 CHECK_GE(byte_count, sizeof(mirror::Object));
/art/runtime/
H A Dmem_map.h55 // Request an anonymous region of length 'byte_count' and a requested base address.
63 static MemMap* MapAnonymous(const char* ashmem_name, byte* addr, size_t byte_count, int prot,
70 static MemMap* MapFile(size_t byte_count, int prot, int flags, int fd, off_t start, argument
72 return MapFileAtAddress(NULL, byte_count, prot, flags, fd, start, false, filename, error_msg);
83 static MemMap* MapFileAtAddress(byte* addr, size_t byte_count, int prot, int flags, int fd,
H A Dmem_map.cc194 static bool CheckMapRequest(byte* expected_ptr, void* actual_ptr, size_t byte_count, argument
205 uintptr_t limit = expected + byte_count;
212 int result = munmap(actual_ptr, byte_count);
214 PLOG(WARNING) << StringPrintf("munmap(%p, %zd) failed", actual_ptr, byte_count);
239 MemMap* MemMap::MapAnonymous(const char* name, byte* expected_ptr, size_t byte_count, int prot, argument
241 if (byte_count == 0) {
244 size_t page_aligned_byte_count = RoundUp(byte_count, kPageSize);
382 return new MemMap(name, reinterpret_cast<byte*>(actual), byte_count, actual,
386 MemMap* MemMap::MapFileAtAddress(byte* expected_ptr, size_t byte_count, int prot, int flags, int fd, argument
401 uintptr_t limit = expected + byte_count;
[all...]
H A Dutils.cc451 std::string PrettySize(int64_t byte_count) { argument
463 if (byte_count < 0) {
465 byte_count = -byte_count;
469 if (byte_count >= kUnitThresholds[i]) {
474 negative_str, byte_count / kBytesPerUnit[i], kUnitStrings[i]);
/art/runtime/jdwp/
H A Djdwp_priv.h64 void ConsumeBytes(size_t byte_count);
/art/runtime/mirror/
H A Dstring.cc195 size_t byte_count = GetUtfLength(); local
196 std::string result(byte_count, static_cast<char>(0));

Completed in 1760 milliseconds

12