/third_party/node/deps/ngtcp2/ngtcp2/lib/ |
H A D | ngtcp2_ringbuf.c | 44 int ngtcp2_ringbuf_init(ngtcp2_ringbuf *rb, size_t nmemb, size_t size, in ngtcp2_ringbuf_init() argument 46 uint8_t *buf = ngtcp2_mem_malloc(mem, nmemb * size); in ngtcp2_ringbuf_init() 51 ngtcp2_ringbuf_buf_init(rb, nmemb, size, buf, mem); in ngtcp2_ringbuf_init() 56 void ngtcp2_ringbuf_buf_init(ngtcp2_ringbuf *rb, size_t nmemb, size_t size, in ngtcp2_ringbuf_buf_init() argument 67 rb->size = size; in ngtcp2_ringbuf_buf_init() 84 return (void *)&rb->buf[rb->first * rb->size]; in ngtcp2_ringbuf_push_front() 96 return (void *)&rb->buf[offset * rb->size]; in ngtcp2_ringbuf_push_back() 117 return &rb->buf[offset * rb->size]; in ngtcp2_ringbuf_get()
|
/third_party/mesa3d/src/util/ |
H A D | os_memory_fd.c | 49 size_t size; member 68 os_import_memory_fd(int fd, void **ptr, uint64_t *size, char const *driver_id) in os_import_memory_fd() argument 88 mapped_ptr = mmap(NULL, header.size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in os_import_memory_fd() 93 // the offset does not count as part of the size in os_import_memory_fd() 94 *size = header.size - header.offset; in os_import_memory_fd() 102 os_malloc_aligned_fd(size_t size, size_t alignment, int *fd, char const *fd_name, char const *driver_id) in os_malloc_aligned_fd() argument 113 * alloc_size = size + alignment + sizeof(struct memory_header) + sizeof(size_t) in os_malloc_aligned_fd() 118 if (add_overflow_size_t(size, alignment, &alloc_size) || in os_malloc_aligned_fd() 137 // Save the size an in os_malloc_aligned_fd() [all...] |
/third_party/ltp/testcases/kernel/syscalls/nice/ |
H A D | nice05.c | 74 size_t size; in setup() local 84 size = CPU_ALLOC_SIZE(nrcpus); in setup() 85 CPU_ZERO_S(size, set); in setup() 86 if (sched_getaffinity(0, size, set) < 0) in setup() 89 for (i = 0; i < size * 8; i++) in setup() 90 if (CPU_ISSET_S(i, size, set)) in setup() 93 CPU_ZERO_S(size, set); in setup() 94 CPU_SET_S(some_cpu, size, set); in setup() 95 if (sched_setaffinity(0, size, set) < 0) in setup()
|
/third_party/ltp/testcases/kernel/mem/mtest07/ |
H A D | mallocstress.c | 7 * blocks of increasing size until malloc returns NULL. 54 * @scheme: 0-3; selects how fast memory size grows 57 * and free functions. The size of the memory to be malloced is 58 * determined by the caller of this function. The size can be 72 size_t size = sizeof(long); in allocate_free() local 80 * 3. if new size overflows in allocate_free() 86 ptrs[num_alloc] = malloc(size); in allocate_free() 92 /* Increase size according to one of four schedules. */ in allocate_free() 95 newsize = size + oldsize; in allocate_free() 96 oldsize = size; in allocate_free() [all...] |
/third_party/ltp/testcases/kernel/syscalls/madvise/ |
H A D | madvise10.c | 58 int size; member 79 for (i = 0; i < tc->size; i++) { in cmp_area() 91 static int set_advice(char *addr, int size, int advise) in set_advice() argument 93 TEST(madvise(addr, size, advise)); in set_advice() 98 addr, size, advise); in set_advice() 101 addr, size, advise); in set_advice() 107 tst_res(TPASS, "madvise(%p, %d, 0x%x)", addr, size, advise); in set_advice() 134 if (set_advice(addr, tc->size, tc->advise1)) in test_madvise() 137 if (!set_advice(addr, tc->size, tc->advise2)) { in test_madvise()
|
/third_party/ltp/tools/sparse/sparse-src/ |
H A D | allocate.c | 74 void *allocate(struct allocator_struct *desc, unsigned int size) in allocate() argument 83 * (b) use a constant size in allocate() 94 } while ((size -= sizeof(void *)) > 0); in allocate() 99 desc->useful_bytes += size; in allocate() 100 size = (size + alignment - 1) & ~(alignment-1); in allocate() 101 if (!blob || blob->left < size) { in allocate() 106 if (size > chunking) in allocate() 118 blob->offset += size; in allocate() 119 blob->left -= size; in allocate() [all...] |
/third_party/node/deps/v8/src/regexp/ |
H A D | regexp-stack.cc | 73 Address RegExpStack::EnsureCapacity(size_t size) { in EnsureCapacity() argument 74 if (size > kMaximumStackSize) return kNullAddress; in EnsureCapacity() 75 if (thread_local_.memory_size_ < size) { in EnsureCapacity() 76 if (size < kMinimumDynamicStackSize) size = kMinimumDynamicStackSize; in EnsureCapacity() 77 byte* new_memory = NewArray<byte>(size); in EnsureCapacity() 80 MemCopy(new_memory + size - thread_local_.memory_size_, in EnsureCapacity() 86 thread_local_.memory_top_ = new_memory + size; in EnsureCapacity() 87 thread_local_.memory_size_ = size; in EnsureCapacity()
|
/third_party/mesa3d/src/gallium/auxiliary/util/ |
H A D | u_transfer.c | 10 unsigned size, const void *data) in u_default_buffer_subdata() 25 if (offset == 0 && size == resource->width0) { in u_default_buffer_subdata() 32 u_box_1d(offset, size, &box); in u_default_buffer_subdata() 38 memcpy(map, data, size); in u_default_buffer_subdata() 44 unsigned offset, unsigned size, in u_default_clear_buffer() 56 if (offset == 0 && size == resource->width0) { in u_default_clear_buffer() 62 u_box_1d(offset, size, &box); in u_default_clear_buffer() 69 for (unsigned off = 0; off < size; off += clear_value_size) in u_default_clear_buffer() 70 memcpy(map + off, clear_value, MIN2(clear_value_size, size - off)); in u_default_clear_buffer() 7 u_default_buffer_subdata(struct pipe_context *pipe, struct pipe_resource *resource, unsigned usage, unsigned offset, unsigned size, const void *data) u_default_buffer_subdata() argument 42 u_default_clear_buffer(struct pipe_context *pipe, struct pipe_resource *resource, unsigned offset, unsigned size, const void *clear_value, int clear_value_size) u_default_clear_buffer() argument
|
/third_party/musl/Benchmark/musl/ |
H A D | libc_malloc.cpp | 65 size_t size = MALLOC_SIZE; in Bm_function_realloc_twice() local 66 char *p = (char *)malloc(size); in Bm_function_realloc_twice() 72 benchmark::DoNotOptimize(realloc(p, size * 2)); in Bm_function_realloc_twice() 83 size_t size = MALLOC_SIZE; in Bm_function_realloc_half() local 84 char *p = (char *)malloc(size); in Bm_function_realloc_half() 90 benchmark::DoNotOptimize(realloc(p, size / 2)); in Bm_function_realloc_half() 101 size_t size = MALLOC_SIZE; in Bm_function_realloc_equal() local 102 char *p = (char *)malloc(size); in Bm_function_realloc_equal() 108 benchmark::DoNotOptimize(realloc(p, size)); in Bm_function_realloc_equal()
|
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/spirv_assembly/ |
H A D | vktSpvAsmComputeShaderTestUtil.cpp | 35 DE_ASSERT(outputAllocs.size() != 0); in verifyOutputWithEpsilon() 36 DE_ASSERT(outputAllocs.size() == expectedOutputs.size()); in verifyOutputWithEpsilon() 38 for (size_t outputNdx = 0; outputNdx < outputAllocs.size(); ++outputNdx) in verifyOutputWithEpsilon() 43 std::vector<float> expectedFloats (expectedBytes.size() / sizeof (float)); in verifyOutputWithEpsilon() 44 std::vector<float> actualFloats (expectedBytes.size() / sizeof (float)); in verifyOutputWithEpsilon() 46 memcpy(&expectedFloats[0], &expectedBytes.front(), expectedBytes.size()); in verifyOutputWithEpsilon() 47 memcpy(&actualFloats[0], outputAllocs[outputNdx]->getHostPtr(), expectedBytes.size()); in verifyOutputWithEpsilon() 48 for (size_t floatNdx = 0; floatNdx < actualFloats.size(); ++floatNdx) in verifyOutputWithEpsilon()
|
/third_party/skia/third_party/externals/angle2/src/compiler/preprocessor/ |
H A D | Input.cpp | 101 size_t size = mLength[mReadLoc.sIndex] - mReadLoc.cIndex; 102 size = std::min(size, maxSize); 103 for (size_t i = 0; i < size; ++i) 110 size = i; 111 maxRead = nRead + size; // Stop reading right before the backslash. 114 std::memcpy(buf + nRead, mString[mReadLoc.sIndex] + mReadLoc.cIndex, size); 115 nRead += size; 116 mReadLoc.cIndex += size;
|
/third_party/skia/src/gpu/ |
H A D | GrRingBuffer.cpp | 14 // Get offset into buffer that has enough space for size 16 size_t GrRingBuffer::getAllocationOffset(size_t size) { in getAllocationOffset() argument 37 if (fTotalSize - modHead < size) { in getAllocationOffset() 39 if (modTail < size) { in getAllocationOffset() 48 } else if (modTail - modHead < size) { in getAllocationOffset() 53 fHead = SkAlignTo(head + size, fAlignment); in getAllocationOffset() 57 GrRingBuffer::Slice GrRingBuffer::suballocate(size_t size) { in suballocate() argument 60 size_t offset = this->getAllocationOffset(size); in suballocate() 78 size_t offset = this->getAllocationOffset(size); in suballocate() 85 for (unsigned int i = 0; i < fPreviousBuffers.size(); [all...] |
/third_party/skia/third_party/externals/swiftshader/src/OpenGL/compiler/preprocessor/ |
H A D | Input.cpp | 109 size_t size = mLength[mReadLoc.sIndex] - mReadLoc.cIndex; 110 size = std::min(size, maxSize); 111 for (size_t i = 0; i < size; ++i) 118 size = i; 119 maxRead = nRead + size; // Stop reading right before the backslash. 122 std::memcpy(buf + nRead, mString[mReadLoc.sIndex] + mReadLoc.cIndex, size); 123 nRead += size; 124 mReadLoc.cIndex += size;
|
/third_party/skia/third_party/externals/tint/fuzzers/tint_ast_fuzzer/ |
H A D | fuzzer.cc | 46 size_t size, in LLVMFuzzerCustomMutator() 49 Source::File file("test.wgsl", {reinterpret_cast<char*>(data), size}); in LLVMFuzzerCustomMutator() 78 if (result.wgsl.size() > max_size) { in LLVMFuzzerCustomMutator() 87 data, result.wgsl.data(), result.wgsl.size()); in LLVMFuzzerCustomMutator() 88 return result.wgsl.size(); in LLVMFuzzerCustomMutator() 91 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { in LLVMFuzzerTestOneInput() argument 92 if (size == 0) { in LLVMFuzzerTestOneInput() 113 TransformBuilder tb(data, size); in LLVMFuzzerTestOneInput() 119 fuzzer.Run(data, size); in LLVMFuzzerTestOneInput() 45 LLVMFuzzerCustomMutator(uint8_t* data, size_t size, size_t max_size, unsigned seed) LLVMFuzzerCustomMutator() argument
|
/third_party/skia/third_party/externals/zlib/contrib/tests/fuzzers/ |
H A D | deflate_fuzzer.cc | 24 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { in LLVMFuzzerTestOneInput() argument 25 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() 41 std::vector<uint8_t> compressed(src.size() * 2 + 1000); in LLVMFuzzerTestOneInput() 43 stream.avail_out = compressed.size(); in LLVMFuzzerTestOneInput() 54 compressed.resize(compressed.size() - stream.avail_out); in LLVMFuzzerTestOneInput() 61 std::vector<uint8_t> decompressed(src.size() + 1); in LLVMFuzzerTestOneInput() 63 stream.avail_in = compressed.size(); in LLVMFuzzerTestOneInput() 65 stream.avail_out = decompressed.size(); in LLVMFuzzerTestOneInput() 68 decompressed.resize(decompressed.size() - stream.avail_out); in LLVMFuzzerTestOneInput()
|
/third_party/skia/third_party/externals/expat/expat/tests/ |
H A D | memcheck.c | 56 tracking_malloc(size_t size) { in tracking_malloc() argument 63 entry->num_bytes = size; in tracking_malloc() 64 entry->allocation = malloc(size); in tracking_malloc() 126 tracking_realloc(void *ptr, size_t size) { in tracking_realloc() argument 130 /* By definition, this is equivalent to malloc(size) */ in tracking_realloc() 131 return tracking_malloc(size); in tracking_realloc() 133 if (size == 0) { in tracking_realloc() 148 entry->allocation = realloc(ptr, size); in tracking_realloc() 165 entry->allocation = realloc(ptr, size); in tracking_realloc() 173 entry->num_bytes = size; in tracking_realloc() [all...] |
/third_party/skia/third_party/externals/freetype/builds/vms/ |
H A D | ftsystem.c | 90 /* size :: The requested size in bytes. */ 97 long size ) in ft_alloc() 101 return malloc( size ); in ft_alloc() 116 /* cur_size :: The current size of the allocated memory block. */ 118 /* new_size :: The newly requested size in bytes. */ 196 munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size ); in ft_close_stream() 199 stream->size = 0; in ft_close_stream() 233 stream->size = stat_buf.st_size; in FT_BASE_DEF() 234 if ( !stream->size ) in FT_BASE_DEF() [all...] |
/third_party/vk-gl-cts/external/vulkancts/modules_no_buildgn/vulkan/spirv_assembly/ |
H A D | vktSpvAsmComputeShaderTestUtil.cpp | 35 DE_ASSERT(outputAllocs.size() != 0); in verifyOutputWithEpsilon() 36 DE_ASSERT(outputAllocs.size() == expectedOutputs.size()); in verifyOutputWithEpsilon() 38 for (size_t outputNdx = 0; outputNdx < outputAllocs.size(); ++outputNdx) in verifyOutputWithEpsilon() 43 std::vector<float> expectedFloats (expectedBytes.size() / sizeof (float)); in verifyOutputWithEpsilon() 44 std::vector<float> actualFloats (expectedBytes.size() / sizeof (float)); in verifyOutputWithEpsilon() 46 memcpy(&expectedFloats[0], &expectedBytes.front(), expectedBytes.size()); in verifyOutputWithEpsilon() 47 memcpy(&actualFloats[0], outputAllocs[outputNdx]->getHostPtr(), expectedBytes.size()); in verifyOutputWithEpsilon() 48 for (size_t floatNdx = 0; floatNdx < actualFloats.size(); ++floatNdx) in verifyOutputWithEpsilon()
|
/third_party/vk-gl-cts/framework/opengl/ |
H A D | gluStrUtil.hpp | 43 const deUint32 size; member in glu::detail::EnumPointerFmt 46 EnumPointerFmt (const deUint32* value_, deUint32 size_, GetEnumNameFunc getName_) : value(value_), size(size_), getName(getName_) {} in EnumPointerFmt() 53 const deUint32 size; member in glu::detail::BooleanPointerFmt 55 BooleanPointerFmt (const deUint8* value_, deUint32 size_) : value(value_), size(size_) {} in BooleanPointerFmt() 80 inline detail::EnumPointerFmt getEnumPointerStr (const deUint32* value, deInt32 size, detail::EnumPointerFmt::GetEnumNameFunc getName) in getEnumPointerStr() argument 82 return detail::EnumPointerFmt(value, (deUint32)de::max(0, size), getName); in getEnumPointerStr() 85 inline detail::BooleanPointerFmt getBooleanPointerStr (const deUint8* value, deInt32 size) in getBooleanPointerStr() argument 87 return detail::BooleanPointerFmt(value, (deUint32)de::max(0, size)); in getBooleanPointerStr() 104 void getBooleanPointerStr (const bool* value, deInt32 size); // delete
|
/third_party/ffmpeg/libavfilter/ |
H A D | vf_deflicker.c | 50 int size; member 77 { "size", "set how many frames to use", OFFSET(size), AV_OPT_TYPE_INT, {.i64=5}, 2, SIZE, FLAGS }, 78 { "s", "set how many frames to use", OFFSET(size), AV_OPT_TYPE_INT, {.i64=5}, 2, SIZE, FLAGS }, 212 for (y = 0; y < s->size; y++) { in get_am_factor() 216 *f /= s->size; in get_am_factor() 227 for (y = 0; y < s->size; y++) { in get_gm_factor() 231 *f = pow(*f, 1.0f / s->size); in get_gm_factor() 242 for (y = 0; y < s->size; y++) { in get_hm_factor() 246 *f = s->size / * in get_hm_factor() [all...] |
/third_party/alsa-lib/src/pcm/ |
H A D | pcm_mmap_emul.c | 279 snd_pcm_sframes_t size; in sync_slave_write() local 284 size = map->appl_ptr - *slave->appl.ptr; in sync_slave_write() 285 if (size < 0) in sync_slave_write() 286 size += pcm->boundary; in sync_slave_write() 287 if (size) { in sync_slave_write() 289 size = snd_pcm_write_mmap(pcm, offset, size); in sync_slave_write() 292 return size; in sync_slave_write() 302 snd_pcm_sframes_t size; in sync_slave_read() local 304 size in sync_slave_read() 317 snd_pcm_mmap_emul_mmap_commit(snd_pcm_t *pcm, snd_pcm_uframes_t offset, snd_pcm_uframes_t size) snd_pcm_mmap_emul_mmap_commit() argument [all...] |
/third_party/mbedtls/library/ |
H A D | memory_buffer_alloc.c | 47 size_t size; member 92 hdr->alloc, hdr->size); in debug_header() 211 static void *buffer_alloc_calloc(size_t n, size_t size) in buffer_alloc_calloc() argument 226 original_len = len = n * size; in buffer_alloc_calloc() 228 if (n == 0 || size == 0 || len / n != size) { in buffer_alloc_calloc() 242 if (cur->size >= len) { in buffer_alloc_calloc() 267 if (cur->size - len < sizeof(memory_header) + in buffer_alloc_calloc() 287 heap.total_used += cur->size; in buffer_alloc_calloc() 311 new->size in buffer_alloc_calloc() 549 buffer_alloc_calloc_mutexed(size_t n, size_t size) buffer_alloc_calloc_mutexed() argument [all...] |
/third_party/mesa3d/src/asahi/lib/ |
H A D | agx_device.c | 70 agx_shmem_alloc(struct agx_device *dev, size_t size, bool cmdbuf) in agx_shmem_alloc() argument 79 size, in agx_shmem_alloc() 89 assert(out.size == size); in agx_shmem_alloc() 96 .size = out.size, in agx_shmem_alloc() 103 .ptr.cpu = calloc(1, size), in agx_shmem_alloc() 104 .size = size, in agx_shmem_alloc() 116 agx_bo_alloc(struct agx_device *dev, size_t size, in agx_bo_alloc() argument 221 agx_bo_create(struct agx_device *dev, unsigned size, unsigned flags) agx_bo_create() argument [all...] |
/third_party/musl/porting/linux/user/src/gwp_asan/ |
H A D | gwp_asan.c | 64 extern void gwp_asan_iterate(void *base, size_t size,
65 void (*callback)(void* base, size_t size, void *arg), void *arg);
418 void* libc_gwp_asan_calloc(size_t nmemb, size_t size)
in libc_gwp_asan_calloc() argument 421 return MuslFunc(calloc)(nmemb, size);
in libc_gwp_asan_calloc() 427 if (!__builtin_mul_overflow(nmemb, size, &total_bytes)) {
in libc_gwp_asan_calloc() 428 GWP_ASAN_LOGD("[gwp_asan]: call gwp_asan_malloc nmemb:%{public}d size:%{public}d.\n", nmemb, size);
in libc_gwp_asan_calloc() 436 return MuslFunc(calloc)(nmemb, size);
in libc_gwp_asan_calloc() 439 void* libc_gwp_asan_realloc(void *ptr, size_t size)
in libc_gwp_asan_realloc() argument 442 return MuslFunc(realloc)(ptr, size);
in libc_gwp_asan_realloc() 496 libc_gwp_asan_malloc_iterate(void *base, size_t size, void (*callback)(uintptr_t base, size_t size, void *arg), void *arg) libc_gwp_asan_malloc_iterate() argument [all...] |
/third_party/musl/src/gwp_asan/linux/ |
H A D | gwp_asan.c | 64 extern void gwp_asan_iterate(void *base, size_t size,
65 void (*callback)(void* base, size_t size, void *arg), void *arg);
418 void* libc_gwp_asan_calloc(size_t nmemb, size_t size)
in libc_gwp_asan_calloc() argument 421 return MuslFunc(calloc)(nmemb, size);
in libc_gwp_asan_calloc() 427 if (!__builtin_mul_overflow(nmemb, size, &total_bytes)) {
in libc_gwp_asan_calloc() 428 GWP_ASAN_LOGD("[gwp_asan]: call gwp_asan_malloc nmemb:%{public}d size:%{public}d.\n", nmemb, size);
in libc_gwp_asan_calloc() 436 return MuslFunc(calloc)(nmemb, size);
in libc_gwp_asan_calloc() 439 void* libc_gwp_asan_realloc(void *ptr, size_t size)
in libc_gwp_asan_realloc() argument 442 return MuslFunc(realloc)(ptr, size);
in libc_gwp_asan_realloc() 496 libc_gwp_asan_malloc_iterate(void *base, size_t size, void (*callback)(uintptr_t base, size_t size, void *arg), void *arg) libc_gwp_asan_malloc_iterate() argument [all...] |