/third_party/musl/Benchmark/musl/ |
D | libc_string.cpp | 70 const size_t nbytes = state.range(0); in Bm_function_Memchr() local 74 char *bmmemchrAligned = GetAlignedPtrFilled(&bmmemchr, bmmemchrAlignment, nbytes, 'n'); in Bm_function_Memchr() 75 bmmemchrAligned[nbytes - 1] = '\0'; in Bm_function_Memchr() 81 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in Bm_function_Memchr() 106 const size_t nbytes = state.range(0); in Bm_function_Strnlen() local 110 char *bmstrnlenAligned = GetAlignedPtrFilled(&bmstrnlen, bmstrnlenAlignment, nbytes + 1, 'n'); in Bm_function_Strnlen() 111 bmstrnlenAligned[nbytes - 1] = '\0'; in Bm_function_Strnlen() 117 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in Bm_function_Strnlen() 124 const size_t nbytes = bufferSizes[state.range(0)]; in Bm_function_Strlen_chk() local 126 char *bmstrlenAligned = GetAlignedPtrFilled(&bmstrlen, 0, nbytes + 1, 'n'); in Bm_function_Strlen_chk() [all …]
|
D | util.cpp | 52 char* GetAlignedPtr(std::vector<char>* buf, size_t alignment, size_t nbytes) in GetAlignedPtr() argument 54 buf->resize(nbytes + 2 * alignment); in GetAlignedPtr() 64 char* GetAlignedPtrFilled(std::vector<char>* buf, size_t alignment, size_t nbytes, char fillByte) in GetAlignedPtrFilled() argument 66 char* bufAligned = GetAlignedPtr(buf, alignment, nbytes); in GetAlignedPtrFilled() 67 memset(bufAligned, fillByte, nbytes); in GetAlignedPtrFilled() 71 wchar_t* GetAlignedPtrFilled(std::vector<wchar_t>* buf, size_t alignment, size_t nbytes, wchar_t fi… in GetAlignedPtrFilled() argument 73 wchar_t* bufAligned = GetAlignedPtr(buf, alignment, nbytes); in GetAlignedPtrFilled() 74 wmemset(bufAligned, fillByte, nbytes); in GetAlignedPtrFilled()
|
/third_party/optimized-routines/networking/aarch64/ |
D | chksum_simd.c | 19 slurp_head64(const void **pptr, uint32_t *nbytes) in slurp_head64() argument 21 Assert(*nbytes >= 8); in slurp_head64() 34 *nbytes -= 8 - off; in slurp_head64() 41 slurp_tail64(uint64_t sum, const void *ptr, uint32_t nbytes) in slurp_tail64() argument 43 Assert(nbytes < 8); in slurp_tail64() 44 if (likely(nbytes != 0)) in slurp_tail64() 47 uint64_t mask = ALL_ONES >> (CHAR_BIT * (8 - nbytes)); in slurp_tail64() 48 Assert(__builtin_popcountl(mask) / CHAR_BIT == nbytes); in slurp_tail64() 52 nbytes = 0; in slurp_tail64() 54 Assert(nbytes == 0); in slurp_tail64() [all …]
|
/third_party/libsnd/src/ |
D | mpeg_l3_encode.c | 465 int nbytes, writecount, writen ; in mpeg_l3_encode_write_short_mono() local 473 …nbytes = lame_encode_buffer (pmpeg->lamef, ptr + total, NULL, writecount, pmpeg->block, pmpeg->blo… in mpeg_l3_encode_write_short_mono() 474 if (nbytes < 0) in mpeg_l3_encode_write_short_mono() 475 { psf_log_printf (psf, "lame_encode_buffer returned %d\n", nbytes) ; in mpeg_l3_encode_write_short_mono() 479 if (nbytes) in mpeg_l3_encode_write_short_mono() 480 { writen = psf_fwrite (pmpeg->block, 1, nbytes, psf) ; in mpeg_l3_encode_write_short_mono() 481 if (writen != nbytes) in mpeg_l3_encode_write_short_mono() 482 { psf_log_printf (psf, "*** Warning : short write (%d != %d).\n", writen, nbytes) ; in mpeg_l3_encode_write_short_mono() 499 int nbytes, writecount, writen ; in mpeg_l3_encode_write_short_stereo() local 512 …nbytes = lame_encode_buffer_interleaved (pmpeg->lamef, ubuf.sbuf, writecount / 2, pmpeg->block, pm… in mpeg_l3_encode_write_short_stereo() [all …]
|
/third_party/optimized-routines/networking/ |
D | chksum.c | 14 slurp_head32(const void **pptr, uint32_t *nbytes) in slurp_head32() argument 17 Assert(*nbytes >= 4); in slurp_head32() 26 *nbytes -= 4 - off; in slurp_head32() 33 __chksum(const void *ptr, unsigned int nbytes) in __chksum() argument 38 if (nbytes > 300) in __chksum() 42 sum = slurp_head32(&ptr, &nbytes); in __chksum() 48 for (uint32_t nquads = nbytes / 16; nquads != 0; nquads--) in __chksum() 57 nbytes %= 16; in __chksum() 58 Assert(nbytes < 16); in __chksum() 61 while (nbytes >= 4) in __chksum() [all …]
|
/third_party/ltp/include/lapi/ |
D | sync_file_range.h | 19 static inline long sync_file_range(int fd, off64_t offset, off64_t nbytes, in sync_file_range() argument 26 (int)(offset >> 32), (int)offset, (int)(nbytes >> 32), in sync_file_range() 27 (int)nbytes); in sync_file_range() 30 (int)(offset >> 32), nbytes, (int)(nbytes >> 32)); in sync_file_range() 33 return tst_syscall(__NR_sync_file_range2, fd, flags, offset, nbytes); in sync_file_range() 37 (int)offset, (int)(nbytes >> 32), (int)nbytes, flags); in sync_file_range() 41 (int)offset, (int)(nbytes >> 32), (int)nbytes, flags); in sync_file_range() 44 (int)(offset >> 32), (int)nbytes, (int)(nbytes >> 32), flags); in sync_file_range() 47 return tst_syscall(__NR_sync_file_range, fd, offset, nbytes, flags); in sync_file_range()
|
/third_party/NuttX/drivers/bch/ |
D | bchlib_write.c | 51 size_t nbytes; in bchlib_write() local 89 nbytes = bch->sectsize - sectoffset; in bchlib_write() 93 nbytes = len; in bchlib_write() 96 ret = LOS_CopyToKernel(&bch->buffer[sectoffset], nbytes, buffer, nbytes); in bchlib_write() 110 return nbytes; in bchlib_write() 113 byteswritten = nbytes; in bchlib_write() 114 buffer += nbytes; in bchlib_write() 115 len -= nbytes; in bchlib_write() 152 nbytes = nsectors * bch->sectsize; in bchlib_write() 153 byteswritten += nbytes; in bchlib_write() [all …]
|
D | bchlib_read.c | 67 size_t nbytes; in bchlib_read() local 107 nbytes = bch->sectsize - sectoffset; in bchlib_read() 111 nbytes = len; in bchlib_read() 114 ret = LOS_CopyFromKernel(buffer, len, &bch->buffer[sectoffset], nbytes); in bchlib_read() 127 return nbytes; in bchlib_read() 130 bytesread = nbytes; in bchlib_read() 131 buffer += nbytes; in bchlib_read() 132 len -= nbytes; in bchlib_read() 158 nbytes = nsectors * bch->sectsize; in bchlib_read() 159 bytesread += nbytes; in bchlib_read() [all …]
|
/third_party/optimized-routines/networking/arm/ |
D | chksum_simd.c | 18 __chksum_arm_simd(const void *ptr, unsigned int nbytes) in __chksum_arm_simd() argument 23 if (unlikely(nbytes < 40)) in __chksum_arm_simd() 25 uint64_t sum = slurp_small(ptr, nbytes); in __chksum_arm_simd() 31 Assert(nbytes >= 8); in __chksum_arm_simd() 47 nbytes -= 8 - off; in __chksum_arm_simd() 57 for (uint32_t i = 0; i < nbytes / 64; i++) in __chksum_arm_simd() 69 nbytes %= 64; in __chksum_arm_simd() 77 while (likely(nbytes >= 16)) in __chksum_arm_simd() 82 nbytes -= 16; in __chksum_arm_simd() 84 Assert(nbytes < 16); in __chksum_arm_simd() [all …]
|
/third_party/musl/porting/liteos_a_newlib/kernel/src/ |
D | malloc.c | 50 void *__wrap__malloc_r(struct _reent *reent, size_t nbytes) in __wrap__malloc_r() argument 52 if (nbytes == 0) { in __wrap__malloc_r() 56 return LOS_MemAlloc(OS_SYS_MEM_ADDR, nbytes); in __wrap__malloc_r() 59 void *__wrap__memalign_r(struct _reent *reent, size_t align, size_t nbytes) in __wrap__memalign_r() argument 61 if (nbytes == 0) { in __wrap__memalign_r() 65 return LOS_MemAllocAlign(OS_SYS_MEM_ADDR, nbytes, align); in __wrap__memalign_r() 68 void *__wrap__realloc_r(struct _reent *reent, void *aptr, size_t nbytes) in __wrap__realloc_r() argument 71 return malloc(nbytes); in __wrap__realloc_r() 74 if (nbytes == 0) { in __wrap__realloc_r() 79 return LOS_MemRealloc(OS_SYS_MEM_ADDR, aptr, nbytes); in __wrap__realloc_r()
|
/third_party/node/deps/openssl/openssl/engines/ |
D | e_padlock.c | 314 const unsigned char *in_arg, size_t nbytes) in padlock_ecb_cipher() argument 317 ALIGNED_CIPHER_DATA(ctx), nbytes); in padlock_ecb_cipher() 322 const unsigned char *in_arg, size_t nbytes) in padlock_cbc_cipher() argument 328 if ((ret = padlock_cbc_encrypt(out_arg, in_arg, cdata, nbytes))) in padlock_cbc_cipher() 335 const unsigned char *in_arg, size_t nbytes) in padlock_cfb_cipher() argument 347 while (chunk < AES_BLOCK_SIZE && nbytes != 0) { in padlock_cfb_cipher() 349 chunk++, nbytes--; in padlock_cfb_cipher() 351 while (chunk < AES_BLOCK_SIZE && nbytes != 0) { in padlock_cfb_cipher() 354 ivp[chunk++] = c, nbytes--; in padlock_cfb_cipher() 360 if (nbytes == 0) in padlock_cfb_cipher() [all …]
|
/third_party/openssl/engines/ |
D | e_padlock.c | 314 const unsigned char *in_arg, size_t nbytes) in padlock_ecb_cipher() argument 317 ALIGNED_CIPHER_DATA(ctx), nbytes); in padlock_ecb_cipher() 322 const unsigned char *in_arg, size_t nbytes) in padlock_cbc_cipher() argument 328 if ((ret = padlock_cbc_encrypt(out_arg, in_arg, cdata, nbytes))) in padlock_cbc_cipher() 335 const unsigned char *in_arg, size_t nbytes) in padlock_cfb_cipher() argument 347 while (chunk < AES_BLOCK_SIZE && nbytes != 0) { in padlock_cfb_cipher() 349 chunk++, nbytes--; in padlock_cfb_cipher() 351 while (chunk < AES_BLOCK_SIZE && nbytes != 0) { in padlock_cfb_cipher() 354 ivp[chunk++] = c, nbytes--; in padlock_cfb_cipher() 360 if (nbytes == 0) in padlock_cfb_cipher() [all …]
|
/third_party/skia/third_party/externals/freetype/src/pcf/ |
D | pcfutil.c | 44 size_t nbytes ) in BitOrderInvert() argument 46 for ( ; nbytes > 0; nbytes--, buf++ ) in BitOrderInvert() 66 size_t nbytes ) in TwoByteSwap() argument 68 for ( ; nbytes >= 2; nbytes -= 2, buf += 2 ) in TwoByteSwap() 85 size_t nbytes ) in FourByteSwap() argument 87 for ( ; nbytes >= 4; nbytes -= 4, buf += 4 ) in FourByteSwap()
|
/third_party/pulseaudio/src/pulse/ |
D | proplist.c | 39 size_t nbytes; member 95 prop->nbytes = strlen(value)+1; in pa_proplist_sets() 132 prop->nbytes = strlen(v)+1; in proplist_setn() 196 prop->nbytes = dn; in proplist_sethex() 233 prop->nbytes = strlen(v)+1; in pa_proplist_setf() 245 int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes) { in pa_proplist_set() argument 251 pa_assert(data || nbytes == 0); in pa_proplist_set() 263 prop->value = pa_xmalloc(nbytes+1); in pa_proplist_set() 264 if (nbytes > 0) in pa_proplist_set() 265 memcpy(prop->value, data, nbytes); in pa_proplist_set() [all …]
|
/third_party/python/Lib/ |
D | secrets.py | 34 def token_bytes(nbytes=None): argument 44 if nbytes is None: 45 nbytes = DEFAULT_ENTROPY 46 return _sysrand.randbytes(nbytes) 48 def token_hex(nbytes=None): argument 59 return binascii.hexlify(token_bytes(nbytes)).decode('ascii') 61 def token_urlsafe(nbytes=None): argument 71 tok = token_bytes(nbytes)
|
/third_party/NuttX/fs/vfs/ |
D | fs_read.c | 64 ssize_t file_read(struct file *filep, void *buf, size_t nbytes) in file_read() argument 93 ret = (int)filep->ops->read(filep, (char *)buf, (size_t)nbytes); in file_read() 126 ssize_t read(int fd, void *buf, size_t nbytes) in read() argument 128 if (buf == NULL || nbytes < 0) in read() 150 if (buf != NULL && nbytes > 0) in read() 152 buf = malloc(nbytes); in read() 160 ret = recv(fd, buf, nbytes, 0); in read() 215 return file_read(filep, buf, nbytes); in read()
|
D | fs_write.c | 66 ssize_t file_write(struct file *filep, const void *buf, size_t nbytes) in file_write() argument 95 ret = filep->ops->write(filep, (const char *)buf, nbytes); in file_write() 157 ssize_t write(int fd, const void *buf, size_t nbytes) in write() argument 176 if (buf != NULL && nbytes > 0) in write() 178 buf = malloc(nbytes); in write() 184 if (LOS_ArchCopyFromUser((void*)buf, bufbak, nbytes) != 0) in write() 192 ret = send(fd, buf, nbytes, 0); in write() 242 return file_write(filep, buf, nbytes); in write()
|
/third_party/python/Objects/ |
D | obmalloc.c | 1550 size_t nbytes; in new_arena() local 1562 nbytes = numarenas * sizeof(*arenas); in new_arena() 1563 arenaobj = (struct arena_object *)PyMem_RawRealloc(arenas, nbytes); in new_arena() 1901 pymalloc_alloc(void *ctx, size_t nbytes) in pymalloc_alloc() argument 1912 if (UNLIKELY(nbytes == 0)) { in pymalloc_alloc() 1915 if (UNLIKELY(nbytes > SMALL_REQUEST_THRESHOLD)) { in pymalloc_alloc() 1919 uint size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT; in pymalloc_alloc() 1949 _PyObject_Malloc(void *ctx, size_t nbytes) in _PyObject_Malloc() argument 1951 void* ptr = pymalloc_alloc(ctx, nbytes); in _PyObject_Malloc() 1956 ptr = PyMem_RawMalloc(nbytes); in _PyObject_Malloc() [all …]
|
/third_party/ltp/testcases/kernel/fs/doio/ |
D | doio.c | 328 int lock_file_region(char *fname, int fd, int type, int start, int nbytes); 410 int alloc_mem(int nbytes); 413 int alloc_sds(int nbytes); 756 int rval, i, infd, nbytes; in doio() local 918 while ((nbytes = read(infd, (char *)&ioreq, sizeof(ioreq)))) { in doio() 935 if (nbytes == -1) { in doio() 943 if (nbytes != sizeof(ioreq)) { in doio() 946 sizeof(ioreq), nbytes); in doio() 1406 int fd, offset, nbytes, oflags, rval; in do_read() local 1425 nbytes = req->r_data.read.r_nbytes; in do_read() [all …]
|
/third_party/curl/lib/ |
D | content_encoding.c | 298 const char *buf, size_t nbytes) in deflate_do_write() argument 304 return Curl_cwriter_write(data, writer->next, type, buf, nbytes); in deflate_do_write() 308 z->avail_in = (uInt) nbytes; in deflate_do_write() 455 const char *buf, size_t nbytes) in gzip_do_write() argument 461 return Curl_cwriter_write(data, writer->next, type, buf, nbytes); in gzip_do_write() 466 z->avail_in = (uInt) nbytes; in gzip_do_write() 494 switch(check_gzip_header((unsigned char *) buf, nbytes, &hlen)) { in gzip_do_write() 497 z->avail_in = (uInt) (nbytes - hlen); in gzip_do_write() 509 z->avail_in = (uInt) nbytes; in gzip_do_write() 531 z->avail_in += (uInt) nbytes; in gzip_do_write() [all …]
|
/third_party/skia/third_party/externals/expat/expat/xmlwf/ |
D | readfilemap.c | 88 size_t nbytes; in filemap() local 114 nbytes = sb.st_size; in filemap() 116 if (nbytes == 0) { in filemap() 122 p = malloc(nbytes); in filemap() 128 n = _EXPAT_read(fd, p, (_EXPAT_read_req_t)nbytes); in filemap() 135 if (n != (_EXPAT_read_count_t)nbytes) { in filemap() 141 processor(p, nbytes, name, arg); in filemap()
|
D | unixfilemap.c | 64 size_t nbytes; in filemap() local 88 nbytes = sb.st_size; in filemap() 90 if (nbytes == 0) { in filemap() 96 p = (void *)mmap((void *)0, (size_t)nbytes, PROT_READ, MAP_FILE | MAP_PRIVATE, in filemap() 103 processor(p, nbytes, name, arg); in filemap() 104 munmap((void *)p, nbytes); in filemap()
|
/third_party/ltp/testcases/misc/crash/ |
D | crash01.c | 90 const int nbytes = 2000; variable 172 if (inc <= nbytes / 2) in main() 176 "Invalid arg for -b (max: %u): %s", nbytes / 2, in main() 186 (malloc_flag == 0) ? "" : "+", nbytes, incptr, nseed, in main() 313 the_data = bad_malloc((nbytes < 0) ? -nbytes : nbytes); in badboy_loop() 485 compute_block_badboy(nbytes); in compute_badboy() 490 || (next_offset > ((nbytes * BLOCK_TRIGGER) / 100))) { in compute_badboy() 491 compute_block_badboy(nbytes); in compute_badboy() 507 else if (nbytes == 0) in try_one_crash()
|
/third_party/pulseaudio/src/tests/ |
D | interpol-test.c | 48 static void stream_write_cb(pa_stream *p, size_t nbytes, void *userdata) { in stream_write_cb() argument 54 fail_unless((nbytes = pa_stream_writable_size(p)) != (size_t) -1); in stream_write_cb() 56 if (nbytes <= 0) in stream_write_cb() 59 fail_unless(pa_stream_begin_write(p, &data, &nbytes) == 0); in stream_write_cb() 60 pa_memzero(data, nbytes); in stream_write_cb() 61 fail_unless(pa_stream_write(p, data, nbytes, NULL, 0, PA_SEEK_RELATIVE) == 0); in stream_write_cb() 65 static void stream_read_cb(pa_stream *p, size_t nbytes, void *userdata) { in stream_read_cb() argument 71 pa_assert_se((nbytes = pa_stream_readable_size(p)) != (size_t) -1); in stream_read_cb() 73 if (nbytes <= 0) in stream_read_cb() 76 fail_unless(pa_stream_peek(p, &data, &nbytes) == 0); in stream_read_cb()
|
/third_party/ltp/testcases/kernel/syscalls/pipe/ |
D | pipe12.c | 41 int nbytes; in verify_pipe() local 66 SAFE_IOCTL(fds[1], FIONREAD, &nbytes); in verify_pipe() 68 if (nbytes == max_size - tc->offset) in verify_pipe() 69 tst_res(TPASS, "write %d bytes", nbytes); in verify_pipe() 72 max_size, nbytes); in verify_pipe() 74 tst_res(TPASS, "write %d bytes", nbytes); in verify_pipe()
|