Home
last modified time | relevance | path

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

/art/runtime/base/unix_file/
Dfd_file.cc138 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const { in Read() argument
140 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset)); in Read()
142 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset)); in Read()
163 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { in Write() argument
165 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset)); in Write()
167 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset)); in Write()
187 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { in ReadFullyGeneric() argument
189 while (byte_count > 0) { in ReadFullyGeneric()
190 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset)); in ReadFullyGeneric()
196 byte_count -= bytes_read; // Reduce the number of remaining bytes. in ReadFullyGeneric()
[all …]
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 PreadFully(void* buffer, size_t byte_count, size_t offset) WARN_UNUSED;
78 bool WriteFully(const void* buffer, size_t byte_count) WARN_UNUSED;
Drandom_access_file.h45 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const = 0;
60 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset) = 0;
/art/compiler/
Dbuffered_output_stream.cc26 bool BufferedOutputStream::WriteFully(const void* buffer, size_t byte_count) { in WriteFully() argument
27 if (byte_count > kBufferSize) { in WriteFully()
29 return out_->WriteFully(buffer, byte_count); in WriteFully()
31 if (used_ + byte_count > kBufferSize) { in WriteFully()
38 memcpy(&buffer_[used_], src, byte_count); in WriteFully()
39 used_ += byte_count; in WriteFully()
Dvector_output_stream.h34 bool WriteFully(const void* buffer, size_t byte_count) { in WriteFully() argument
37 vector_->insert(vector_->end(), &start[0], &start[byte_count]); in WriteFully()
38 offset_ += byte_count; in WriteFully()
40 off_t new_offset = offset_ + byte_count; in WriteFully()
42 memcpy(&(*vector_)[offset_], buffer, byte_count); in WriteFully()
Dfile_output_stream.cc28 bool FileOutputStream::WriteFully(const void* buffer, size_t byte_count) { in WriteFully() argument
29 return file_->WriteFully(buffer, byte_count); in WriteFully()
Dfile_output_stream.h32 virtual bool WriteFully(const void* buffer, size_t byte_count);
Dbuffered_output_stream.h35 virtual bool WriteFully(const void* buffer, size_t byte_count);
Doutput_stream.h44 virtual bool WriteFully(const void* buffer, size_t byte_count) = 0;
/art/runtime/base/
Dhex_dump.cc55 size_t byte_count = byte_count_; in Dump() local
57 while (byte_count > 0) { in Dump()
71 size_t count = std::min(byte_count, 16 - gap); in Dump()
104 byte_count -= count; in Dump()
106 if (byte_count > 0) { in Dump()
Dhex_dump.h32 HexDump(const void* address, size_t byte_count, bool show_actual_addresses, const char* prefix) in HexDump() argument
33 : address_(address), byte_count_(byte_count), show_actual_addresses_(show_actual_addresses), in HexDump()
/art/runtime/gc/
Dheap-inl.h42 size_t byte_count, AllocatorType allocator, in AllocObjectWithAllocator() argument
45 CheckPreconditionsForAllocObject(klass, byte_count); in AllocObjectWithAllocator()
54 if (kCheckLargeObject && UNLIKELY(ShouldAllocLargeObject(klass, byte_count))) { in AllocObjectWithAllocator()
55 obj = AllocLargeObject<kInstrumented, PreFenceVisitor>(self, &klass, byte_count, in AllocObjectWithAllocator()
73 byte_count = RoundUp(byte_count, space::BumpPointerSpace::kAlignment); in AllocObjectWithAllocator()
77 byte_count <= self->TlabSize()) { in AllocObjectWithAllocator()
78 obj = self->AllocTlab(byte_count); in AllocObjectWithAllocator()
87 bytes_allocated = byte_count; in AllocObjectWithAllocator()
92 (obj = rosalloc_space_->AllocThreadLocal(self, byte_count, &bytes_allocated)) && in AllocObjectWithAllocator()
108 obj = TryToAllocate<kInstrumented, false>(self, allocator, byte_count, &bytes_allocated, in AllocObjectWithAllocator()
[all …]
Dheap.h211 Thread* self, mirror::Class* klass, size_t byte_count, AllocatorType allocator,
231 void CheckPreconditionsForAllocObject(mirror::Class* c, size_t byte_count)
729 bool ShouldAllocLargeObject(mirror::Class* c, size_t byte_count) const
741 mirror::Object* AllocLargeObject(Thread* self, mirror::Class** klass, size_t byte_count,
772 void ThrowOutOfMemoryError(Thread* self, size_t byte_count, AllocatorType allocator_type)
Dheap.cc1138 void Heap::ThrowOutOfMemoryError(Thread* self, size_t byte_count, AllocatorType allocator_type) { in ThrowOutOfMemoryError() argument
1141 oss << "Failed to allocate a " << byte_count << " byte allocation with " << total_bytes_free in ThrowOutOfMemoryError()
1144 if (total_bytes_free >= byte_count) { in ThrowOutOfMemoryError()
1159 space->LogFragmentationAllocFailure(oss, byte_count); in ThrowOutOfMemoryError()
3657 void Heap::CheckPreconditionsForAllocObject(mirror::Class* c, size_t byte_count) { in CheckPreconditionsForAllocObject() argument
3658 CHECK(c == nullptr || (c->IsClassClass() && byte_count >= sizeof(mirror::Class)) || in CheckPreconditionsForAllocObject()
3659 (c->IsVariableSize() || c->GetObjectSize() == byte_count)); in CheckPreconditionsForAllocObject()
3660 CHECK_GE(byte_count, sizeof(mirror::Object)); in CheckPreconditionsForAllocObject()
/art/runtime/entrypoints/quick/
Dquick_alloc_entrypoints.cc38 size_t byte_count = klass->GetObjectSize(); \
39 byte_count = RoundUp(byte_count, gc::space::BumpPointerSpace::kAlignment); \
41 if (LIKELY(byte_count < self->TlabSize())) { \
42 obj = self->AllocTlab(byte_count); \
65 size_t byte_count = klass->GetObjectSize(); \
66 byte_count = RoundUp(byte_count, gc::space::BumpPointerSpace::kAlignment); \
68 if (LIKELY(byte_count < self->TlabSize())) { \
69 obj = self->AllocTlab(byte_count); \
91 size_t byte_count = klass->GetObjectSize(); \
92 byte_count = RoundUp(byte_count, gc::space::BumpPointerSpace::kAlignment); \
[all …]
/art/runtime/native/
Djava_lang_StringFactory.cc31 jint high, jint offset, jint byte_count) { in StringFactory_newStringFromBytes() argument
40 if ((offset | byte_count) < 0 || byte_count > data_size - offset) { in StringFactory_newStringFromBytes()
43 offset, byte_count); in StringFactory_newStringFromBytes()
47 mirror::String* result = mirror::String::AllocFromByteArray<true>(soa.Self(), byte_count, in StringFactory_newStringFromBytes()
/art/runtime/
Dmem_map.h64 static MemMap* MapAnonymous(const char* ashmem_name, uint8_t* addr, size_t byte_count, int prot,
71 static MemMap* MapDummy(const char* name, uint8_t* addr, size_t byte_count);
77 static MemMap* MapFile(size_t byte_count, int prot, int flags, int fd, off_t start, in MapFile() argument
80 nullptr, byte_count, prot, flags, fd, start, false, filename, error_msg); in MapFile()
90 static MemMap* MapFileAtAddress(uint8_t* addr, size_t byte_count, int prot, int flags, int fd,
Dmem_map.cc198 static bool CheckMapRequest(uint8_t* expected_ptr, void* actual_ptr, size_t byte_count, in CheckMapRequest() argument
209 uintptr_t limit = expected + byte_count; in CheckMapRequest()
216 int result = munmap(actual_ptr, byte_count); in CheckMapRequest()
218 PLOG(WARNING) << StringPrintf("munmap(%p, %zd) failed", actual_ptr, byte_count); in CheckMapRequest()
259 MemMap* MemMap::MapAnonymous(const char* name, uint8_t* expected_ptr, size_t byte_count, int prot, in MapAnonymous() argument
264 if (byte_count == 0) { in MapAnonymous()
267 size_t page_aligned_byte_count = RoundUp(byte_count, kPageSize); in MapAnonymous()
275 DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg)) << *error_msg; in MapAnonymous()
438 return new MemMap(name, reinterpret_cast<uint8_t*>(actual), byte_count, actual, in MapAnonymous()
442 MemMap* MemMap::MapDummy(const char* name, uint8_t* addr, size_t byte_count) { in MapDummy() argument
[all …]
Dutils.cc461 std::string PrettySize(int64_t byte_count) { in PrettySize() argument
473 if (byte_count < 0) { in PrettySize()
475 byte_count = -byte_count; in PrettySize()
479 if (byte_count >= kUnitThresholds[i]) { in PrettySize()
484 negative_str, byte_count / kBytesPerUnit[i], kUnitStrings[i]); in PrettySize()
Ddebugger.cc1748 size_t byte_count = code_item->insns_size_in_code_units_ * 2; in GetBytecodes() local
1750 const uint8_t* end = begin + byte_count; in GetBytecodes()
4371 void Dbg::DdmSendChunk(uint32_t type, size_t byte_count, const uint8_t* buf) { in DdmSendChunk() argument
4375 vec[0].iov_len = byte_count; in DdmSendChunk()
4912 void Dbg::RecordAllocation(Thread* self, mirror::Class* type, size_t byte_count) { in RecordAllocation() argument
4927 record->SetByteCount(byte_count); in RecordAllocation()
Ddebugger.h680 static void RecordAllocation(Thread* self, mirror::Class* type, size_t byte_count)
Djni_internal.cc1760 size_t byte_count = s->GetUtfLength(); in GetStringUTFChars() local
1761 char* bytes = new char[byte_count + 1]; in GetStringUTFChars()
1765 bytes[byte_count] = '\0'; in GetStringUTFChars()
Dcheck_jni.cc1236 size_t byte_count = a->GetLength() * component_size; in CreateGuardedPACopy() local
1237 void* result = Create(original_ptr, byte_count, true); in CreateGuardedPACopy()
/art/runtime/jdwp/
Djdwp_priv.h81 void ConsumeBytes(size_t byte_count);
/art/runtime/mirror/
Dstring.cc217 size_t byte_count = GetUtfLength(); in ToModifiedUtf8() local
218 std::string result(byte_count, static_cast<char>(0)); in ToModifiedUtf8()