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

/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.h35 virtual bool WriteFully(const void* buffer, size_t byte_count);
H A Doutput_stream.h44 virtual bool WriteFully(const void* buffer, size_t byte_count) = 0;
/art/runtime/base/unix_file/
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 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));
187 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { argument
189 while (byte_count > 0) {
190 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset));
196 byte_count
203 ReadFully(void* buffer, size_t byte_count) argument
207 PreadFully(void* buffer, size_t byte_count, size_t offset) argument
211 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 PreadFully(void* buffer, size_t byte_count, size_t offset) WARN_UNUSED;
78 bool WriteFully(const void* buffer, size_t byte_count) WARN_UNUSED;
/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/native/
H A Djava_lang_StringFactory.cc31 jint high, jint offset, jint byte_count) {
40 if ((offset | byte_count) < 0 || byte_count > data_size - offset) {
43 offset, byte_count);
47 mirror::String* result = mirror::String::AllocFromByteArray<true>(soa.Self(), byte_count,
30 StringFactory_newStringFromBytes(JNIEnv* env, jclass, jbyteArray java_data, jint high, jint offset, jint byte_count) argument
/art/runtime/entrypoints/quick/
H A 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); \
[all...]
/art/runtime/gc/
H A Dheap-inl.h42 size_t byte_count, AllocatorType allocator,
45 CheckPreconditionsForAllocObject(klass, byte_count);
54 if (kCheckLargeObject && UNLIKELY(ShouldAllocLargeObject(klass, byte_count))) {
55 obj = AllocLargeObject<kInstrumented, PreFenceVisitor>(self, &klass, byte_count,
73 byte_count = RoundUp(byte_count, space::BumpPointerSpace::kAlignment);
77 byte_count <= self->TlabSize()) {
78 obj = self->AllocTlab(byte_count);
87 bytes_allocated = byte_count;
92 (obj = rosalloc_space_->AllocThreadLocal(self, byte_count,
41 AllocObjectWithAllocator(Thread* self, mirror::Class* klass, size_t byte_count, AllocatorType allocator, const PreFenceVisitor& pre_fence_visitor) argument
210 AllocLargeObject(Thread* self, mirror::Class** klass, size_t byte_count, const PreFenceVisitor& pre_fence_visitor) argument
[all...]
H A Dheap.h211 Thread* self, mirror::Class* klass, size_t byte_count, AllocatorType allocator,
231 void CheckPreconditionsForAllocObject(mirror::Class* c, size_t byte_count)
410 size_t /*length TODO: element_count or 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)
H A Dheap.cc1138 void Heap::ThrowOutOfMemoryError(Thread* self, size_t byte_count, AllocatorType allocator_type) { argument
1141 oss << "Failed to allocate a " << byte_count << " byte allocation with " << total_bytes_free
1144 if (total_bytes_free >= byte_count) {
1159 space->LogFragmentationAllocFailure(oss, byte_count);
3657 void Heap::CheckPreconditionsForAllocObject(mirror::Class* c, size_t byte_count) { argument
3658 CHECK(c == nullptr || (c->IsClassClass() && byte_count >= sizeof(mirror::Class)) ||
3659 (c->IsVariableSize() || c->GetObjectSize() == byte_count));
3660 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.
64 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, argument
80 nullptr, byte_count, prot, flags, fd, start, false, filename, error_msg);
90 static MemMap* MapFileAtAddress(uint8_t* addr, size_t byte_count, int prot, int flags, int fd,
H A Dmem_map.cc198 static bool CheckMapRequest(uint8_t* expected_ptr, void* actual_ptr, size_t byte_count, argument
209 uintptr_t limit = expected + byte_count;
216 int result = munmap(actual_ptr, byte_count);
218 PLOG(WARNING) << StringPrintf("munmap(%p, %zd) failed", actual_ptr, byte_count);
259 MemMap* MemMap::MapAnonymous(const char* name, uint8_t* expected_ptr, size_t byte_count, int prot, argument
264 if (byte_count == 0) {
267 size_t page_aligned_byte_count = RoundUp(byte_count, kPageSize);
275 DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg)) << *error_msg;
438 return new MemMap(name, reinterpret_cast<uint8_t*>(actual), byte_count, actual,
442 MemMap* MemMap::MapDummy(const char* name, uint8_t* addr, size_t byte_count) { argument
450 MapFileAtAddress(uint8_t* expected_ptr, size_t byte_count, int prot, int flags, int fd, off_t start, bool reuse, const char* filename, std::string* error_msg) argument
[all...]
H A Dutils.cc461 std::string PrettySize(int64_t byte_count) { argument
473 if (byte_count < 0) {
475 byte_count = -byte_count;
479 if (byte_count >= kUnitThresholds[i]) {
484 negative_str, byte_count / kBytesPerUnit[i], kUnitStrings[i]);
H A Ddebugger.h680 static void RecordAllocation(Thread* self, mirror::Class* type, size_t byte_count)
H A Ddebugger.cc1748 size_t byte_count = code_item->insns_size_in_code_units_ * 2; local
1750 const uint8_t* end = begin + byte_count;
4371 void Dbg::DdmSendChunk(uint32_t type, size_t byte_count, const uint8_t* buf) { argument
4375 vec[0].iov_len = byte_count;
4912 void Dbg::RecordAllocation(Thread* self, mirror::Class* type, size_t byte_count) { argument
4927 record->SetByteCount(byte_count);
H A Djni_internal.cc1760 size_t byte_count = s->GetUtfLength(); local
1761 char* bytes = new char[byte_count + 1];
1765 bytes[byte_count] = '\0';
H A Dcheck_jni.cc1236 size_t byte_count = a->GetLength() * component_size; local
1237 void* result = Create(original_ptr, byte_count, true);
/art/runtime/jdwp/
H A Djdwp_priv.h81 void ConsumeBytes(size_t byte_count);
/art/runtime/mirror/
H A Dstring.cc217 size_t byte_count = GetUtfLength(); local
218 std::string result(byte_count, static_cast<char>(0));

Completed in 1974 milliseconds