/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | libbpf_errno.c | 39 int libbpf_strerror(int err, char *buf, size_t size) in libbpf_strerror() argument 41 if (!buf || !size) in libbpf_strerror() 49 ret = strerror_r(err, buf, size); in libbpf_strerror() 50 buf[size - 1] = '\0'; in libbpf_strerror() 58 snprintf(buf, size, "%s", msg); in libbpf_strerror() 59 buf[size - 1] = '\0'; in libbpf_strerror() 63 snprintf(buf, size, "Unknown libbpf error %d", err); in libbpf_strerror() 64 buf[size - 1] = '\0'; in libbpf_strerror()
|
/kernel/linux/linux-5.10/drivers/media/platform/sti/hva/ |
H A D | hva-mem.c | 11 int hva_mem_alloc(struct hva_ctx *ctx, u32 size, const char *name, in hva_mem_alloc() argument 25 base = dma_alloc_attrs(dev, size, &paddr, GFP_KERNEL, in hva_mem_alloc() 28 dev_err(dev, "%s %s : dma_alloc_attrs failed for %s (size=%d)\n", in hva_mem_alloc() 29 ctx->name, __func__, name, size); in hva_mem_alloc() 35 b->size = size; in hva_mem_alloc() 42 ctx->name, size, b->vaddr, &b->paddr, b->name); in hva_mem_alloc() 56 ctx->name, buf->size, buf->vaddr, &buf->paddr, buf->name); in hva_mem_free() 58 dma_free_attrs(dev, buf->size, buf->vaddr, buf->paddr, in hva_mem_free()
|
/kernel/linux/linux-5.10/include/asm-generic/ |
H A D | sections.h | 102 * @size: size of the memory object 104 * Returns: true if the object specified by @virt and @size is entirely 109 size_t size) in memory_contains() 111 return virt >= begin && virt + size <= end; in memory_contains() 120 * @size: size of the memory object 122 * Returns: true if an object's memory region, specified by @virt and @size, 126 size_t size) in memory_intersects() 128 void *vend = virt + size; in memory_intersects() 108 memory_contains(void *begin, void *end, void *virt, size_t size) memory_contains() argument 125 memory_intersects(void *begin, void *end, void *virt, size_t size) memory_intersects() argument 145 init_section_contains(void *virt, size_t size) init_section_contains() argument 159 init_section_intersects(void *virt, size_t size) init_section_intersects() argument [all...] |
/kernel/linux/linux-6.6/drivers/base/ |
H A D | trace.h | 20 TP_PROTO(struct device *dev, const char *op, void *node, const char *name, size_t size), 21 TP_ARGS(dev, op, node, name, size), 28 __field(size_t, size) 35 __entry->size = size; 38 __entry->op, __entry->node, __entry->name, __entry->size) 42 TP_PROTO(struct device *dev, const char *op, void *node, const char *name, size_t size), 43 TP_ARGS(dev, op, node, name, size)
|
/kernel/linux/linux-6.6/drivers/media/pci/bt8xx/ |
H A D | btcx-risc.c | 51 dma_free_coherent(&pci->dev, risc->size, risc->cpu, risc->dma); in btcx_riscmem_free() 57 unsigned int size) in btcx_riscmem_alloc() 62 if (NULL != risc->cpu && risc->size < size) in btcx_riscmem_alloc() 65 cpu = dma_alloc_coherent(&pci->dev, size, &dma, GFP_KERNEL); in btcx_riscmem_alloc() 70 risc->size = size; in btcx_riscmem_alloc() 73 dprintk("btcx: riscmem alloc [%d] dma=%lx cpu=%p size=%d\n", in btcx_riscmem_alloc() 74 memcnt, (unsigned long)dma, cpu, size); in btcx_riscmem_alloc() 55 btcx_riscmem_alloc(struct pci_dev *pci, struct btcx_riscmem *risc, unsigned int size) btcx_riscmem_alloc() argument
|
/kernel/linux/linux-6.6/drivers/media/platform/st/sti/hva/ |
H A D | hva-mem.c | 11 int hva_mem_alloc(struct hva_ctx *ctx, u32 size, const char *name, in hva_mem_alloc() argument 25 base = dma_alloc_attrs(dev, size, &paddr, GFP_KERNEL, in hva_mem_alloc() 28 dev_err(dev, "%s %s : dma_alloc_attrs failed for %s (size=%d)\n", in hva_mem_alloc() 29 ctx->name, __func__, name, size); in hva_mem_alloc() 35 b->size = size; in hva_mem_alloc() 42 ctx->name, size, b->vaddr, &b->paddr, b->name); in hva_mem_alloc() 56 ctx->name, buf->size, buf->vaddr, &buf->paddr, buf->name); in hva_mem_free() 58 dma_free_attrs(dev, buf->size, buf->vaddr, buf->paddr, in hva_mem_free()
|
/kernel/linux/linux-6.6/drivers/media/platform/st/sti/delta/ |
H A D | delta-mem.c | 10 int hw_alloc(struct delta_ctx *ctx, u32 size, const char *name, in hw_alloc() argument 18 addr = dma_alloc_attrs(delta->dev, size, &dma_addr, in hw_alloc() 22 "%s hw_alloc:dma_alloc_coherent failed for %s (size=%d)\n", in hw_alloc() 23 ctx->name, name, size); in hw_alloc() 28 buf->size = size; in hw_alloc() 36 ctx->name, size, buf->vaddr, &buf->paddr, buf->name); in hw_alloc() 47 ctx->name, buf->size, buf->vaddr, &buf->paddr, buf->name); in hw_free() 49 dma_free_attrs(delta->dev, buf->size, in hw_free()
|
/kernel/linux/linux-6.6/drivers/of/ |
H A D | module.c | 50 ssize_t size; in of_request_module() local 56 size = of_modalias(np, NULL, 0); in of_request_module() 57 if (size < 0) in of_request_module() 58 return size; in of_request_module() 61 size++; in of_request_module() 63 str = kmalloc(size, GFP_KERNEL); in of_request_module() 67 of_modalias(np, str, size); in of_request_module() 68 str[size - 1] = '\0'; in of_request_module()
|
/kernel/liteos_m/testsuites/sample/kernel/mem/ |
H A D | It_los_mem_015.c | 39 UINT32 size = 0x500;
in TestCase() local 47 for (p0 = LOS_MemAlloc(g_memPool, size); p0 != NULL; i++) {
in TestCase() 49 p0 = LOS_MemAlloc(g_memPool, size);
in TestCase() 52 if (MemGetFreeSize(g_memPool) >= size + LOS_MEM_NODE_HEAD_SIZE + LOS_MEM_POOL_SIZE) {
in TestCase() 62 size = size * 3; // 3, Set new size to 3 times the previous one.
in TestCase() 63 p0 = LOS_MemAlloc(g_memPool, size);
in TestCase() 69 p0 = LOS_MemAlloc(g_memPool, size);
in TestCase()
|
/test/xts/device_attest/test/fuzztest/devattestservice_fuzzer/ |
H A D | devattestservice_fuzzer.cpp | 46 static void GetAttestStatus(const uint8_t* data, size_t size)
in GetAttestStatus() argument 49 g_baseFuzzSize = size;
in GetAttestStatus() 60 g_baseFuzzData + size);
in GetAttestStatus() 64 void DevattestServiceFuzzTest(const uint8_t* data, size_t size)
in DevattestServiceFuzzTest() argument 67 if (static_cast<int32_t>(size) >= demandSize) {
in DevattestServiceFuzzTest() 68 GetAttestStatus(data, size);
in DevattestServiceFuzzTest() 75 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
in LLVMFuzzerTestOneInput() argument 78 OHOS::DevattestServiceFuzzTest(data, size);
in LLVMFuzzerTestOneInput()
|
/test/xts/device_attest/test/fuzztest/devattestclient_fuzzer/ |
H A D | devattestclient_fuzzer.cpp | 46 static void GetAttestStatus(const uint8_t* data, size_t size) in GetAttestStatus() argument 49 g_baseFuzzSize = size; in GetAttestStatus() 60 g_baseFuzzData + size); in GetAttestStatus() 64 void DevattestClientFuzzTest(const uint8_t* data, size_t size) in DevattestClientFuzzTest() argument 67 if (static_cast<int32_t>(size) >= demandSize) { in DevattestClientFuzzTest() 68 GetAttestStatus(data, size); in DevattestClientFuzzTest() 75 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) in LLVMFuzzerTestOneInput() argument 78 OHOS::DevattestClientFuzzTest(data, size); in LLVMFuzzerTestOneInput()
|
/test/xts/device_attest/test/fuzztest/devattestcorenetwork_fuzzer/ |
H A D | devattestcorenetwork_fuzzer.cpp | 45 static void ParseResp(const uint8_t* data, size_t size)
in ParseResp() argument 50 size_t msgDataSize = size + 1;
in ParseResp() 61 ret = memcpy_s(msgData, msgDataSize, data, size);
in ParseResp() 73 void DevattestCoreNetworkFuzzTest(const uint8_t* data, size_t size)
in DevattestCoreNetworkFuzzTest() argument 76 if (static_cast<int32_t>(size) >= demandSize) {
in DevattestCoreNetworkFuzzTest() 77 ParseResp(data, size);
in DevattestCoreNetworkFuzzTest() 84 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
in LLVMFuzzerTestOneInput() argument 87 OHOS::DevattestCoreNetworkFuzzTest(data, size);
in LLVMFuzzerTestOneInput()
|
/third_party/ffmpeg/libavcodec/ |
H A D | eac3_core_bsf.c | 35 ret = init_get_bits8(&gbc, pkt->data, pkt->size); in eac3_core_filter() 47 pkt->size = FFMIN(hdr.frame_size, pkt->size); in eac3_core_filter() 48 } else if (hdr.frame_type == EAC3_FRAME_TYPE_DEPENDENT && pkt->size > hdr.frame_size) { in eac3_core_filter() 51 ret = init_get_bits8(&gbc, pkt->data + hdr.frame_size, pkt->size - hdr.frame_size); in eac3_core_filter() 63 pkt->size -= hdr.frame_size; in eac3_core_filter() 66 pkt->size = 0; in eac3_core_filter() 69 pkt->size = 0; in eac3_core_filter()
|
/third_party/ffmpeg/libavformat/ |
H A D | rtpenc_h263.c | 43 void ff_rtp_send_h263(AVFormatContext *s1, const uint8_t *buf1, int size) in ff_rtp_send_h263() argument 51 while (size > 0) { in ff_rtp_send_h263() 53 if (size >= 2 && (buf1[0] == 0) && (buf1[1] == 0)) { in ff_rtp_send_h263() 56 size -= 2; in ff_rtp_send_h263() 62 len = FFMIN(max_packet_size - 2, size); in ff_rtp_send_h263() 65 if (len < size) { in ff_rtp_send_h263() 76 ff_rtp_send_data(s1, s->buf, q - s->buf, (len == size)); in ff_rtp_send_h263() 79 size -= len; in ff_rtp_send_h263()
|
H A D | supenc.c | 31 size_t size = pkt->size; in sup_write_packet() local 45 while (size > 2) { in sup_write_packet() 48 if (len > size) { in sup_write_packet() 50 size); in sup_write_packet() 62 size -= len; in sup_write_packet() 65 if (size > 0) { in sup_write_packet() 67 size); in sup_write_packet()
|
/third_party/ffmpeg/libavutil/ |
H A D | video_enc_params.c | 35 size_t size = blocks_offset; in av_video_enc_params_alloc() local 38 if (nb_blocks > (SIZE_MAX - size) / sizeof(AVVideoBlockParams)) in av_video_enc_params_alloc() 40 size += sizeof(AVVideoBlockParams) * nb_blocks; in av_video_enc_params_alloc() 42 par = av_mallocz(size); in av_video_enc_params_alloc() 52 *out_size = size; in av_video_enc_params_alloc() 63 size_t size; in av_video_enc_params_create_side_data() local 65 par = av_video_enc_params_alloc(type, nb_blocks, &size); in av_video_enc_params_create_side_data() 68 buf = av_buffer_create((uint8_t *)par, size, NULL, NULL, 0); in av_video_enc_params_create_side_data()
|
/third_party/lzma/CPP/Common/ |
H A D | DynamicBuffer.h | 19 void Grow(size_t size)
in Grow() argument 22 if (delta < size)
in Grow() 23 delta = size;
in Grow() 27 newCap = _size + size;
in Grow() 28 if (newCap < size)
in Grow() 56 void AddData(const T *data, size_t size)
in AddData() argument 58 memcpy(GetCurPtrAndGrow(size), data, size * sizeof(T));
in AddData()
|
/third_party/node/benchmark/crypto/ |
H A D | hkdf.js | 12 size: [10, 64, 1024], 20 function measureSync(n, size, salt, info, hash, key) { 23 hkdfSync(hash, key, salt, info, size); 27 function measureAsync(n, size, salt, info, hash, key) { 36 hkdf(hash, key, salt, info, size, done); 39 function main({ n, sync, size, salt, info, hash, key }) { 41 measureSync(n, size, salt, info, hash, key); 43 measureAsync(n, size, salt, info, hash, key);
|
/third_party/ltp/testcases/kernel/fs/mongo/ |
H A D | mongo_slinks.c | 31 int size = 1; in main() local 33 if ((buffer = malloc(size + 1)) == NULL) { in main() 64 // Increase size of buffer to readlink untile whole symlink body will be read. in main() 68 memset(buffer, 0, size + 1); in main() 69 num = readlink(new_path, buffer, size); in main() 70 if (num < 1 || num > size) { in main() 83 if (num < size) in main() 88 size *= 2; in main() 89 if ((buffer = realloc(buffer, size + 1)) == NULL) { in main()
|
/third_party/ltp/testcases/kernel/syscalls/mincore/ |
H A D | mincore03.c | 31 static int size, page_size; variable 37 SAFE_MUNMAP(ptr, size); in cleanup() 43 size = page_size * NUM_PAGES; in setup() 53 ptr = SAFE_MMAP(NULL, size, PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); in test_mincore() 55 SAFE_MLOCK(ptr, size); in test_mincore() 57 mincore_ret = mincore(ptr, size, vec); in test_mincore() 72 SAFE_MUNLOCK(ptr, size); in test_mincore() 73 SAFE_MUNMAP(ptr, size); in test_mincore()
|
/third_party/node/deps/v8/src/base/ |
H A D | page-allocator.h | 33 void* AllocatePages(void* hint, size_t size, size_t alignment, 39 size_t size, const void* original_address) override; 41 bool FreePages(void* address, size_t size) override; 43 bool ReleasePages(void* address, size_t size, size_t new_size) override; 45 bool SetPermissions(void* address, size_t size, 48 bool DiscardSystemPages(void* address, size_t size) override; 50 bool DecommitPages(void* address, size_t size) override; 55 void* RemapShared(void* old_address, void* new_address, size_t size);
|
/third_party/node/deps/v8/src/base/sanitizer/ |
H A D | lsan-page-allocator.h | 35 void* AllocatePages(void* address, size_t size, size_t alignment, 39 size_t size, const void* original_address) override; 43 bool FreePages(void* address, size_t size) override; 45 bool ReleasePages(void* address, size_t size, size_t new_size) override; 47 bool SetPermissions(void* address, size_t size, 49 return page_allocator_->SetPermissions(address, size, access); 52 bool DecommitPages(void* address, size_t size) override { 53 return page_allocator_->DecommitPages(address, size);
|
/third_party/node/deps/v8/src/heap/cppgc/ |
H A D | allocation.cc | 37 cppgc::AllocationHandle& handle, size_t size, GCInfoIndex index) { in Allocate() 38 return static_cast<ObjectAllocator&>(handle).AllocateObject(size, index); in Allocate() 45 cppgc::AllocationHandle& handle, size_t size, AlignVal alignment, in Allocate() 47 return static_cast<ObjectAllocator&>(handle).AllocateObject(size, alignment, in Allocate() 55 cppgc::AllocationHandle& handle, size_t size, GCInfoIndex index, in Allocate() 57 return static_cast<ObjectAllocator&>(handle).AllocateObject(size, index, in Allocate() 65 cppgc::AllocationHandle& handle, size_t size, AlignVal alignment, in Allocate() 68 size, alignment, index, space_index); in Allocate() 36 Allocate( cppgc::AllocationHandle& handle, size_t size, GCInfoIndex index) Allocate() argument 44 Allocate( cppgc::AllocationHandle& handle, size_t size, AlignVal alignment, GCInfoIndex index) Allocate() argument 54 Allocate( cppgc::AllocationHandle& handle, size_t size, GCInfoIndex index, CustomSpaceIndex space_index) Allocate() argument 64 Allocate( cppgc::AllocationHandle& handle, size_t size, AlignVal alignment, GCInfoIndex index, CustomSpaceIndex space_index) Allocate() argument
|
/third_party/mesa3d/src/gallium/auxiliary/rtasm/ |
H A D | rtasm_execmem.c | 88 rtasm_exec_malloc(size_t size) in rtasm_exec_malloc() argument 99 size = (size + 31) & ~31; /* next multiple of 32 bytes */ in rtasm_exec_malloc() 100 block = u_mmAllocMem( exec_heap, size, 5, 0 ); /* 5 -> 32-byte alignment */ in rtasm_exec_malloc() 139 rtasm_exec_malloc(size_t size) in rtasm_exec_malloc() argument 141 return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE); in rtasm_exec_malloc() 160 rtasm_exec_malloc(size_t size) in rtasm_exec_malloc() argument 162 return MALLOC( size ); in rtasm_exec_malloc()
|
/third_party/mesa3d/src/util/ |
H A D | u_fifo.h | 36 size_t size; member 40 u_fifo_create(size_t size) in u_fifo_create() argument 43 fifo = MALLOC(sizeof(*fifo) + size * sizeof(void*)); in u_fifo_create() 48 fifo->size = size; in u_fifo_create() 57 if (fifo->num >= fifo->size) in u_fifo_add() 60 if (++fifo->head >= fifo->size) in u_fifo_add() 78 if (++fifo->tail >= fifo->size) in u_fifo_pop()
|