/device/generic/goldfish-opengl/android-emu/android/base/ |
D | address_space.h | 44 uint64_t size : 63; member 56 int size; member 73 static void* address_space_malloc0(size_t size) { in address_space_malloc0() argument 75 return ANDROID_EMU_ADDRESS_SPACE_MALLOC0_FUNC(size); in address_space_malloc0() 77 void* res = malloc(size); in address_space_malloc0() 78 memset(res, 0, size); in address_space_malloc0() 83 static void* address_space_realloc(void* ptr, size_t size) { in address_space_realloc() argument 85 return ANDROID_EMU_ADDRESS_SPACE_REALLOC_FUNC(ptr, size); in address_space_realloc() 87 void* res = realloc(ptr, size); in address_space_realloc() 115 uint64_t this_size = block->size; in address_space_allocator_find_available_block() [all …]
|
/device/google/contexthub/util/common/ |
D | ring.cpp | 25 RingBuffer::RingBuffer(size_t size) in RingBuffer() argument 26 : mSize(size), in RingBuffer() 37 ssize_t RingBuffer::write(const sensors_event_t *ev, size_t size) { in write() argument 43 if (size > numAvailableToWrite) { in write() 44 size = numAvailableToWrite; in write() 50 if (copy > size) { in write() 51 copy = size; in write() 56 if (size > copy) { in write() 57 memcpy(mData, &ev[copy], (size - copy) * sizeof(sensors_event_t)); in write() 60 mWritePos += size; in write() [all …]
|
D | JSONObject.cpp | 51 ssize_t JSONValue::Parse(const char *data, size_t size, JSONValue *out) { in Parse() argument 53 while (offset < size && isspace(data[offset])) { in Parse() 57 if (offset == size) { in Parse() 66 while (offset < size && isspace(data[offset])) { in Parse() 70 if (offset == size) { in Parse() 80 ssize_t n = Parse(&data[offset], size - offset, &val); in Parse() 90 while (offset < size && isspace(data[offset])) { in Parse() 94 if (offset == size) { in Parse() 113 while (offset < size && isspace(data[offset])) { in Parse() 117 if (offset == size) { in Parse() [all …]
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/include/sys/xt-shmem/ |
D | xf-mem.h | 62 static inline void * xf_mem_alloc(u32 size, u32 align, u32 core, u32 shared) in xf_mem_alloc() argument 68 return xf_mm_alloc(&xf_dsp_shmem_pool, size); in xf_mem_alloc() 73 return xf_mm_alloc(&XF_CORE_DATA(core)->local_pool, size); in xf_mem_alloc() 77 #define xf_mem_alloc(size, align, core, shared) \ argument 81 BUG(!XF_MM_ALIGNED(size), _x("Bad size: %u"), size); \ 82 __data = (xf_mem_alloc)(size, align, core, shared); \ 83 TRACE(1, _b("alloc-%u: %p[%u] (shared=%u)"), core, __data, size, shared); \ 88 static inline void xf_mem_free(void *p, u32 size, u32 core, u32 shared) in xf_mem_free() argument 94 xf_mm_free(&xf_dsp_shmem_pool, p, size); in xf_mem_free() 100 xf_mm_free(&XF_CORE_DATA(core)->local_pool, p, size); in xf_mem_free() [all …]
|
/device/generic/goldfish-opengl/system/vulkan_enc/ |
D | VulkanStreamGuest.cpp | 49 ssize_t write(const void *buffer, size_t size) override { in write() argument 50 uint8_t* streamBuf = (uint8_t*)mStream->alloc(size); in write() 51 memcpy(streamBuf, buffer, size); in write() 52 return size; in write() 55 ssize_t read(void *buffer, size_t size) override { in read() argument 56 if (!mStream->readback(buffer, size)) { in read() 57 ALOGE("FATAL: Could not read back %zu bytes", size); in read() 60 return size; in read() 93 return mWriteBuffer.size() - mWritePos; in remainingWriteBufferSize() 101 ssize_t bufferedWrite(const void *buffer, size_t size) { in bufferedWrite() argument [all …]
|
/device/google/coral/json-c/ |
D | printbuf.c | 39 p->size = 32; in printbuf_new() 41 if(!(p->buf = (char*)malloc(p->size))) { in printbuf_new() 62 if (p->size >= min_size) in printbuf_extend() 65 new_size = p->size * 2; in printbuf_extend() 71 p->bpos, min_size, p->size, new_size); in printbuf_extend() 75 p->size = new_size; in printbuf_extend() 80 int printbuf_memappend(struct printbuf *p, const char *buf, int size) in printbuf_memappend() argument 82 if (p->size <= p->bpos + size + 1) { in printbuf_memappend() 83 if (printbuf_extend(p, p->bpos + size + 1) < 0) in printbuf_memappend() 86 memcpy(p->buf + p->bpos, buf, size); in printbuf_memappend() [all …]
|
/device/google/crosshatch/json-c/ |
D | printbuf.c | 39 p->size = 32; in printbuf_new() 41 if(!(p->buf = (char*)malloc(p->size))) { in printbuf_new() 62 if (p->size >= min_size) in printbuf_extend() 65 new_size = p->size * 2; in printbuf_extend() 71 p->bpos, min_size, p->size, new_size); in printbuf_extend() 75 p->size = new_size; in printbuf_extend() 80 int printbuf_memappend(struct printbuf *p, const char *buf, int size) in printbuf_memappend() argument 82 if (p->size <= p->bpos + size + 1) { in printbuf_memappend() 83 if (printbuf_extend(p, p->bpos + size + 1) < 0) in printbuf_memappend() 86 memcpy(p->buf + p->bpos, buf, size); in printbuf_memappend() [all …]
|
/device/google/bonito/json-c/ |
D | printbuf.c | 39 p->size = 32; in printbuf_new() 41 if(!(p->buf = (char*)malloc(p->size))) { in printbuf_new() 62 if (p->size >= min_size) in printbuf_extend() 65 new_size = p->size * 2; in printbuf_extend() 71 p->bpos, min_size, p->size, new_size); in printbuf_extend() 75 p->size = new_size; in printbuf_extend() 80 int printbuf_memappend(struct printbuf *p, const char *buf, int size) in printbuf_memappend() argument 82 if (p->size <= p->bpos + size + 1) { in printbuf_memappend() 83 if (printbuf_extend(p, p->bpos + size + 1) < 0) in printbuf_memappend() 86 memcpy(p->buf + p->bpos, buf, size); in printbuf_memappend() [all …]
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/core/ |
D | xf-mem.c | 49 static inline xf_mm_block_t * xf_mm_block_init(void *addr, u32 size) in xf_mm_block_init() argument 54 return b->l_node.color = size, b; in xf_mm_block_init() 58 static inline int xf_mm_block_length_less(xf_mm_block_t *b, u32 size) in xf_mm_block_length_less() argument 61 return (b->l_node.color < size); in xf_mm_block_length_less() 72 static inline u32 xf_mm_block_length_add(xf_mm_block_t *b, u32 size) in xf_mm_block_length_add() argument 75 return ((b->l_node.color += size) & ~1); in xf_mm_block_length_add() 79 static inline u32 xf_mm_block_length_sub(xf_mm_block_t *b, u32 size) in xf_mm_block_length_sub() argument 82 return ((b->l_node.color -= size) & ~1); in xf_mm_block_length_sub() 90 static inline xf_mm_block_t * xf_mm_find_by_size(xf_mm_pool_t *pool, u32 size) in xf_mm_find_by_size() argument 101 if (!xf_mm_block_length_less(b, size)) in xf_mm_find_by_size() [all …]
|
/device/linaro/dragonboard/qcom/pd-mapper/ |
D | assoc.c | 56 void assoc_init(struct assoc *assoc, unsigned long size) in assoc_init() argument 58 assert(size > 0); in assoc_init() 60 assoc->size = size; in assoc_init() 62 assoc->keys = calloc(size, sizeof(const char *)); in assoc_init() 63 assoc->values = malloc(size * sizeof(void *)); in assoc_init() 70 hash = assoc_hash(key) % assoc->size; in assoc_get() 75 hash = (hash + 1) % assoc->size; in assoc_get() 87 assert(assoc->fill < assoc->size); in _assoc_set() 90 if (5 * assoc->fill > 4 * assoc->size) { in _assoc_set() 91 assoc_init(&new_set, assoc->size * 5 / 4); in _assoc_set() [all …]
|
/device/generic/goldfish/qemud/ |
D | qemud.cpp | 30 int qemud_channel_send(int pipe, const void* msg, int size) { in qemud_channel_send() argument 33 if (size < 0) in qemud_channel_send() 34 size = strlen((const char*)msg); in qemud_channel_send() 36 if (size == 0) in qemud_channel_send() 39 snprintf(header, sizeof(header), "%04x", size); in qemud_channel_send() 44 if (qemu_pipe_write_fully(pipe, msg, size)) { in qemud_channel_send() 53 int size; in qemud_channel_recv() local 60 if (sscanf(header, "%04x", &size) != 1) { in qemud_channel_recv() 63 if (size > maxsize) { in qemud_channel_recv() 67 if (qemu_pipe_read_fully(pipe, msg, size)) { in qemud_channel_recv() [all …]
|
/device/linaro/hikey/hifi/xaf/host-apf/utest/ |
D | xaf-mem-test.c | 32 void* mem_malloc(int size, int id) in mem_malloc() argument 46 heap_ptr = malloc(size); in mem_malloc() 49 g_mem_obj.mem_dev[index].size = size; in mem_malloc() 50 g_mem_obj.persi_mem_dev += size; in mem_malloc() 62 heap_ptr = malloc(size); in mem_malloc() 65 g_mem_obj.mem_comp[index].size = size; in mem_malloc() 66 g_mem_obj.persi_mem_comp += size; in mem_malloc() 100 int size; in mem_free() local 108 size=g_mem_obj.mem_dev[index].size; in mem_free() 109 g_mem_obj.mem_dev[index].size = 0; in mem_free() [all …]
|
/device/amlogic/yukawa/hal/gralloc/ |
D | mali_gralloc_bufferallocation.cpp | 104 size_t *size, AllocType type) in get_rgb_stride_and_size() argument 114 if (size != NULL) in get_rgb_stride_and_size() 116 *size = stride *height; in get_rgb_stride_and_size() 177 if (size != NULL) in get_rgb_stride_and_size() 179 *size = stride *h_aligned + in get_rgb_stride_and_size() 198 size_t *size, AllocType type, int *internalHeight) in get_afbc_yuv420_8bit_stride_and_size() argument 255 if (size != NULL) in get_afbc_yuv420_8bit_stride_and_size() 259 *size = (yuv420_afbc_luma_stride + yuv420_afbc_chroma_stride) * height + in get_afbc_yuv420_8bit_stride_and_size() 289 … get_yv12_stride_and_size(int width, int height, int *pixel_stride, int *byte_stride, size_t *size, in get_yv12_stride_and_size() argument 296 return get_afbc_yuv420_8bit_stride_and_size(width, height, pixel_stride, byte_stride, size, type, in get_yv12_stride_and_size() [all …]
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/include/sys/xt-shmem/board-hikey/ |
D | dsp_comm.h | 30 #define DSP_FLUSH_PIECE_CACHE(addr, size) xthal_dcache_region_writeback(addr, size) argument 32 #define DSP_INVALIDATE_PIECE_CACHE(addr, size) xthal_dcache_region_invalidate(addr, size) argument 35 #define memset(d,uCData,size) dsp_memset(d,uCData,size) argument 36 #define memcpy(d,s,size) dsp_memcpy(d,s,size) argument 40 void dsp_memcpy(void *d, void *s, unsigned int size); 41 void dsp_memset(void *d, unsigned char ucData, unsigned int size);
|
/device/google/cuttlefish/host/frontend/gcastv2/https/ |
D | WebSocketHandler.cpp | 28 uint8_t *data, size_t size, bool isEOS) { in handleRequest() argument 32 while (offset + 1 < size) { in handleRequest() 34 const size_t avail = size - offset; in handleRequest() 138 const void *data, size_t size, SendMode mode) { in sendMessage() argument 142 if (size > 65535) { in sendMessage() 144 } else if (size > 125) { in sendMessage() 157 std::unique_ptr<uint8_t[]> buffer(new uint8_t[numHeaderBytes + size]); in sendMessage() 162 if (size > 65535) { in sendMessage() 168 msg[6] = (size >> 24) & 0xff; in sendMessage() 169 msg[7] = (size >> 16) & 0xff; in sendMessage() [all …]
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/include/ |
D | xf-mm.h | 46 #define XF_ALIGNED(size) \ argument 47 (((size) + XF_PROXY_ALIGNMENT - 1) & ~(XF_PROXY_ALIGNMENT - 1)) 89 u32 size; member 108 #define XF_MM(size) (((size) + sizeof(xf_mm_item) - 1) & ~(sizeof(xf_mm_item) - 1)) argument 111 #define XF_MM_ALIGNED(size) (!((size) & (sizeof(xf_mm_item) - 1))) argument 127 u32 size; member 136 extern int xf_mm_init(xf_mm_pool_t *pool, void *addr, u32 size); 139 extern void * xf_mm_alloc(xf_mm_pool_t *pool, u32 size); 142 extern void xf_mm_free(xf_mm_pool_t *pool, void *addr, u32 size);
|
/device/google/contexthub/firmware/os/core/ |
D | heap.c | 38 uint32_t size: MAX_HEAP_ORDER; member 69 return (gHeapTail == node) ? NULL : (struct HeapNode*)(node->data + node->size); in heapPrvGetNext() 74 uint32_t size = REAL_HEAP_SIZE; in heapInit() local 79 if (size < sizeof(struct HeapNode)) in heapInit() 86 node->size = size - sizeof(struct HeapNode); in heapInit() 101 node->size += sizeof(struct HeapNode) + next->size; in heapMergeFreeChunks() 130 if (!node->used && node->size >= sz && (!best || best->size > node->size)) { in heapAlloc() 132 if (best->size == sz) in heapAlloc() 142 if (best->size - sz > sizeof(struct HeapNode)) { //there is a point to split up the chunk in heapAlloc() 148 node->size = best->size - sz - sizeof(struct HeapNode); in heapAlloc() [all …]
|
/device/google/contexthub/contexthubhal/ |
D | message_buf.h | 42 size_t size; variable 47 size = bufSize; in MessageBuf() 53 size = bufSize; in MessageBuf() 60 size_t getSize() const { return size; } in getSize() 62 size_t getRoom() const { return size - pos; } in getRoom() 64 if (pos == size) { in readU8() 70 if (pos == size || readOnly) in writeU8() 75 if (pos > (size - sizeof(uint16_t))) { in readU16() 84 if (pos > (size - sizeof(uint16_t)) || readOnly) { in writeU16() 92 if (pos > (size - sizeof(uint32_t))) { in readU32() [all …]
|
/device/linaro/hikey/gralloc960/ |
D | mali_gralloc_bufferallocation.cpp | 104 size_t *size, AllocType type) in get_rgb_stride_and_size() argument 114 if (size != NULL) in get_rgb_stride_and_size() 116 *size = stride *height; in get_rgb_stride_and_size() 177 if (size != NULL) in get_rgb_stride_and_size() 179 *size = stride *h_aligned + in get_rgb_stride_and_size() 198 size_t *size, AllocType type, int *internalHeight) in get_afbc_yuv420_8bit_stride_and_size() argument 255 if (size != NULL) in get_afbc_yuv420_8bit_stride_and_size() 259 *size = (yuv420_afbc_luma_stride + yuv420_afbc_chroma_stride) * height + in get_afbc_yuv420_8bit_stride_and_size() 289 … get_yv12_stride_and_size(int width, int height, int *pixel_stride, int *byte_stride, size_t *size, in get_yv12_stride_and_size() argument 296 return get_afbc_yuv420_8bit_stride_and_size(width, height, pixel_stride, byte_stride, size, type, in get_yv12_stride_and_size() [all …]
|
/device/google/cuttlefish/host/commands/modem_simulator/unittest/ |
D | service_test.cpp | 107 auto bytes_read = ril_side_->client_fd->Read(buffer.data(), buffer.size()); in ReadCommandResponse() 134 if (command.size() > 0) { // "\r\r" ? in ReadCommandResponse() 170 if (response.compare(0, iter->size(), *iter) == 0) { in IsFinalResponseError() 179 if (response.compare(0, command_prefix_.size(), command_prefix_) == 0) { in IsIntermediateResponse() 204 return (response[0].compare(0, expect.size(), expect) == 0); in closeLogicalChannel() 238 ASSERT_EQ(response.size(), 2); in TEST_F() 271 ASSERT_EQ(response.size(), 2); in TEST_F() 282 ASSERT_EQ(response.size(), 2); in TEST_F() 292 ASSERT_EQ(response.size(), 2); in TEST_F() 363 ASSERT_EQ(response.size(), 2); in TEST_F() [all …]
|
/device/generic/goldfish/audio/ |
D | ring_buffer.cpp | 72 chunk.size = (mProducePos >= mConsumePos) in getProduceChunk() 79 size_t RingBuffer::produce(size_t size) { in produce() argument 82 size = std::min(size, size_t(availableToProduce)); in produce() 84 mProducePos = (mProducePos + size) % mCapacity; in produce() 85 mAvailableToConsume += size; in produce() 88 return size; in produce() 91 size_t RingBuffer::produce(const void *srcRaw, size_t size) { in produce() argument 93 int produceSize = std::min(mCapacity - mAvailableToConsume, int(size)); in produce() 94 size = produceSize; in produce() 112 return size; in produce() [all …]
|
/device/generic/goldfish-opengl/shared/qemupipe/ |
D | qemu_pipe_common.cpp | 17 int qemu_pipe_read_fully(QEMU_PIPE_HANDLE pipe, void* buffer, int size) { in qemu_pipe_read_fully() argument 20 while (size > 0) { in qemu_pipe_read_fully() 21 int n = QEMU_PIPE_RETRY(qemu_pipe_read(pipe, p, size)); in qemu_pipe_read_fully() 25 size -= n; in qemu_pipe_read_fully() 31 int qemu_pipe_write_fully(QEMU_PIPE_HANDLE pipe, const void* buffer, int size) { in qemu_pipe_write_fully() argument 34 while (size > 0) { in qemu_pipe_write_fully() 35 int n = QEMU_PIPE_RETRY(qemu_pipe_write(pipe, p, size)); in qemu_pipe_write_fully() 39 size -= n; in qemu_pipe_write_fully()
|
/device/google/bonito/sdm710/kernel-headers/media/ |
D | msm_media_info.h | 1231 unsigned int uv_alignment = 0, size = 0; in VENUS_BUFFER_SIZE() local 1259 size = y_plane + uv_plane + in VENUS_BUFFER_SIZE() 1261 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1265 size += MSM_MEDIA_ALIGN(width, w_alignment) * in VENUS_BUFFER_SIZE() 1267 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1274 size = y_plane + uv_plane + in VENUS_BUFFER_SIZE() 1276 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1282 size = y_plane + uv_plane; in VENUS_BUFFER_SIZE() 1283 size = 2 * size + extra_size; in VENUS_BUFFER_SIZE() 1284 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() [all …]
|
/device/google/crosshatch/sdm845/original-kernel-headers/media/ |
D | msm_media_info.h | 1231 unsigned int uv_alignment = 0, size = 0; in VENUS_BUFFER_SIZE() local 1259 size = y_plane + uv_plane + in VENUS_BUFFER_SIZE() 1261 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1265 size += MSM_MEDIA_ALIGN(width, w_alignment) * in VENUS_BUFFER_SIZE() 1267 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1274 size = y_plane + uv_plane + in VENUS_BUFFER_SIZE() 1276 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1282 size = y_plane + uv_plane; in VENUS_BUFFER_SIZE() 1283 size = 2 * size + extra_size; in VENUS_BUFFER_SIZE() 1284 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() [all …]
|
/device/google/crosshatch/sdm845/kernel-headers/media/ |
D | msm_media_info.h | 1231 unsigned int uv_alignment = 0, size = 0; in VENUS_BUFFER_SIZE() local 1259 size = y_plane + uv_plane + in VENUS_BUFFER_SIZE() 1261 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1265 size += MSM_MEDIA_ALIGN(width, w_alignment) * in VENUS_BUFFER_SIZE() 1267 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1274 size = y_plane + uv_plane + in VENUS_BUFFER_SIZE() 1276 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() 1282 size = y_plane + uv_plane; in VENUS_BUFFER_SIZE() 1283 size = 2 * size + extra_size; in VENUS_BUFFER_SIZE() 1284 size = MSM_MEDIA_ALIGN(size, 4096); in VENUS_BUFFER_SIZE() [all …]
|