/third_party/ltp/testcases/kernel/syscalls/madvise/ |
D | madvise02.c | 94 if (mlock(file1, st.st_size) < 0) in tcases_filter() 149 file1 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup() 150 file2 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup() 151 file3 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in setup() 157 ptr_addr = SAFE_MALLOC(st.st_size); in setup() 161 SAFE_MUNMAP(file2 + st.st_size - pagesize, pagesize); in setup() 177 TEST(madvise(*(tc->addr), st.st_size, tc->advice)); in advice_test() 195 SAFE_MUNMAP(file1, st.st_size); in cleanup() 196 SAFE_MUNMAP(file2, st.st_size - pagesize); in cleanup() 197 SAFE_MUNMAP(file3, st.st_size); in cleanup()
|
D | madvise01.c | 78 sfile = SAFE_MMAP(NULL, st.st_size, in setup() 83 amem = SAFE_MMAP(NULL, st.st_size, in setup() 91 SAFE_MUNMAP(sfile, st.st_size); in cleanup() 92 SAFE_MUNMAP(amem, st.st_size); in cleanup() 100 TEST(madvise(*(tc->addr), st.st_size, tc->advice)); in verify_madvise()
|
/third_party/ltp/testcases/kernel/syscalls/sendfile/ |
D | sendfile06.c | 48 TEST(sendfile(out_fd, in_fd, NULL, sb.st_size)); in run() 51 if (sb.st_size != TST_RET) in run() 54 sb.st_size, TST_RET); in run() 55 else if (after_pos != sb.st_size) in run() 59 (int64_t)(sb.st_size), (int64_t)(after_pos)); in run()
|
/third_party/musl/libc-test/src/functionalext/supplement/mman/ |
D | mmap.c | 52 start = mmap(NULL, statbuff.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in mmap_0100() 56 mm = munmap(start, statbuff.st_size); in mmap_0100() 90 start = mmap(NULL, statbuff.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in mmap_0200() 94 mm = munmap(start, statbuff.st_size); in mmap_0200() 144 start = mmap(NULL, statbuff.st_size, PROT_EXEC, MAP_PRIVATE | MAP_LOCKED, fd, 0); in mmap_0400() 147 mm = munmap(start, statbuff.st_size); in mmap_0400() 182 … start = mmap(NULL, statbuff.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_DENYWRITE, fd, 0); in mmap_0500() 185 mm = munmap(start, statbuff.st_size); in mmap_0500() 219 start = mmap(NULL, statbuff.st_size, PROT_NONE, MAP_PRIVATE | MAP_FIXED, -1, 0); in mmap_0600() 255 start = mmap(NULL, statbuff.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, OFF_MASK); in mmap_0700() [all …]
|
/third_party/elfutils/libdwfl/ |
D | dwfl_module_addrsym.c | 139 if (value + sym->st_size > state->min_label) in try_sym_value() 140 state->min_label = value + sym->st_size; in try_sym_value() 142 if (sym->st_size == 0 || state->addr - value < sym->st_size) in try_sym_value() 150 if (sym->st_size != 0) in try_sym_value() 179 else if (sym->st_size != 0 in try_sym_value() 181 && ((state->closest_sym->st_size > sym->st_size in try_sym_value() 184 || (state->closest_sym->st_size >= sym->st_size in try_sym_value()
|
/third_party/ltp/testcases/kernel/syscalls/splice/ |
D | splice02.c | 76 if (st.st_size != file_size) { in do_child() 78 st.st_size, file_size); in do_child() 89 blocks = LTP_ALIGN(st.st_size, page_size) / page_size; in do_child() 95 to_check = (block+1) * page_size < (unsigned long)st.st_size ? in do_child() 96 page_size : st.st_size % page_size; in do_child()
|
/third_party/libwebsockets/lib/misc/lwsac/ |
D | cached-file.c | 180 all = sizeof(*info) + (unsigned long)s.st_size + 2; in lwsac_cached_file() 191 *len = (unsigned long)s.st_size; in lwsac_cached_file() 192 a[s.st_size] = '\0'; in lwsac_cached_file() 194 rd = read(fd, a, (unsigned long)s.st_size); in lwsac_cached_file() 195 if (rd != s.st_size) { in lwsac_cached_file()
|
/third_party/libsnd/tests/ |
D | win32_test.c | 109 if (sizeof (statbuf.st_size) != sizeof (INT64)) in show_fstat_error() 153 printf ("4) According to fstat(), the file length is %ld, ", (long) statbuf.st_size) ; in show_fstat_error() 157 if (statbuf.st_size != 2 * sizeof (data)) in show_fstat_error() 253 stat_size = buf.st_size ; in show_stat_fstat_error() 259 fstat_size = buf.st_size ; in show_stat_fstat_error() 303 printf (" File size is %d bytes.\n", (int) buf.st_size) ; in write_to_closed_file() 312 printf (" File size is %d bytes.\n", (int) buf.st_size) ; in write_to_closed_file()
|
/third_party/elfutils/lib/ |
D | crc32_file.c | 52 size_t mapsize = st.st_size; in crc32_file() 67 if (st.st_size <= (off_t) mapsize) in crc32_file() 69 *resp = crc32 (crc, mapped, st.st_size); in crc32_file() 75 st.st_size -= mapsize; in crc32_file()
|
/third_party/ltp/testcases/kernel/syscalls/write/ |
D | write06.c | 46 if (statbuf.st_size != K2) in verify_write() 47 tst_res(TFAIL, "file size is %ld != K2", statbuf.st_size); in verify_write() 62 if (statbuf.st_size != K3) in verify_write() 63 tst_res(TFAIL, "Wrong file size after append %zu expected %u", statbuf.st_size, K3); in verify_write()
|
/third_party/ltp/testcases/kernel/syscalls/pwrite/ |
D | pwrite04.c | 54 if (statbuf.st_size != K2) in verify_pwrite() 55 tst_res(TFAIL, "file size is %ld != K2", statbuf.st_size); in verify_pwrite() 62 if (statbuf.st_size != K3) in verify_pwrite() 63 tst_res(TFAIL, "file size is %ld != K3", statbuf.st_size); in verify_pwrite()
|
/third_party/rust/crates/regex/regex-capi/examples/ |
D | iter.c | 29 if ((uintmax_t)status.st_size > SIZE_MAX) { in main() 33 if (status.st_size == 0) { in main() 37 size_t sherlock_len = (size_t)status.st_size; in main() 39 NULL, status.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in main()
|
/third_party/musl/libc-test/src/functionalext/supplement/mman/mman_gtest/ |
D | mman_mmap_test.cpp | 97 void* mmapping = mmap(nullptr, sb.st_size, PROT_NONE, MAP_PRIVATE | MAP_FIXED, -1, 0); 116 void* mmapping = mmap(nullptr, sb.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 120 int unmapResult = munmap(mmapping, sb.st_size); 137 void* mmapping = mmap(nullptr, sb.st_size, PROT_EXEC, MAP_PRIVATE | MAP_LOCKED, fd, 0); 141 int unmapResult = munmap(mmapping, sb.st_size);
|
/third_party/skia/third_party/externals/libjpeg-turbo/md5/ |
D | md5hl.c | 101 if (ofs > stbuf.st_size) in MD5FileChunk() 102 ofs = stbuf.st_size; in MD5FileChunk() 103 if ((len == 0) || (len > stbuf.st_size - ofs)) in MD5FileChunk() 104 len = stbuf.st_size - ofs; in MD5FileChunk()
|
/third_party/ltp/testcases/kernel/syscalls/init_module/ |
D | init_module01.c | 33 buf = SAFE_MMAP(0, sb.st_size, PROT_READ|PROT_EXEC, MAP_PRIVATE, fd, 0); in setup() 39 TST_EXP_PASS(init_module(buf, sb.st_size, "status=valid")); in run() 48 munmap(buf, sb.st_size); in cleanup()
|
/third_party/vixl/examples/aarch32/ |
D | disasm-a32.cc | 158 Symbol(symname, sym.st_value, 0, sym.st_size, sym.st_shndx)); in visit() 179 sym.st_size, in visit() 186 sym.st_size, in visit() 237 mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE, elf_in, 0))) != in main() 245 munmap(base_addr, sb.st_size); in main() 251 munmap(base_addr, sb.st_size); in main() 310 munmap(base_addr, sb.st_size); in main()
|
/third_party/node/test/wasi/c/ |
D | ftruncate.c | 22 assert(st.st_size == 0); in main() 28 assert(st.st_size == 500); in main() 34 assert(st.st_size == 300); in main()
|
/third_party/toybox/toys/posix/ |
D | cpio.c | 234 && st.st_size && (fd = open(name, O_RDONLY))<0)) in cpio_main() 240 if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode)) st.st_size = 0; in cpio_main() 241 if (st.st_size >> 32) perror_msg("skipping >2G file '%s'", name); in cpio_main() 246 (int)st.st_mtime, (int)st.st_size, dev_major(st.st_dev), in cpio_main() 257 llen = st.st_size; in cpio_main() 270 llen = st.st_size & 3; in cpio_main()
|
/third_party/toybox/toys/pending/ |
D | more.c | 116 st.st_size = show_prompt = col = row = 0; in more_main() 136 if (st.st_size) in more_main() 138 (int) (100 * ( (double) ftell(fp) / (double) st.st_size)), in more_main() 139 (long long)st.st_size); in more_main()
|
/third_party/libexif/test/ |
D | test-parse-from-data.c | 111 data = malloc(stbuf.st_size); in test_parse() 113 fprintf (stderr, "Failed to allocate %ld bytes for reading %s\n", stbuf.st_size, filename); in test_parse() 116 if (-1 == read(fd, data, stbuf.st_size)) { in test_parse() 124 d = exif_data_new_from_data(data, stbuf.st_size); in test_parse()
|
/third_party/openssl/fuzz/ |
D | test-corpus.c | 51 buf = malloc(st.st_size); in testfile() 53 s = fread(buf, 1, st.st_size, f); in testfile() 54 OPENSSL_assert(s == (size_t)st.st_size); in testfile()
|
/third_party/node/deps/openssl/openssl/fuzz/ |
D | test-corpus.c | 51 buf = malloc(st.st_size); in testfile() 53 s = fread(buf, 1, st.st_size, f); in testfile() 54 OPENSSL_assert(s == (size_t)st.st_size); in testfile()
|
/third_party/musl/libc-test/src/functionalext/supplement/unistd/ |
D | ftruncate.c | 40 EXPECT_EQ("ftruncate_0100", statbuff.st_size, FILE_ZERO); in ftruncate_0100() 62 EXPECT_EQ("ftruncate_0200", (int)statbuff.st_size, FILE_FIRST); in ftruncate_0200() 83 EXPECT_EQ("ftruncate_0300", (int)statbuff.st_size, FILE_SECOND); in ftruncate_0300()
|
D | readlink.c | 32 buf = malloc(sb.st_size + 1); in readlink_0100() 65 buf = malloc(sb.st_size + 1); in readlink_0200() 96 buf = malloc(sb.st_size + 1); in readlink_0300()
|
/third_party/ltp/testcases/kernel/mem/mmapstress/ |
D | mmapstress10.c | 576 filesize = statbuf.st_size; 578 if (statbuf.st_size - sparseoffset > SIZE_MAX) { 582 mapsize_mapper = (size_t) (statbuf.st_size - sparseoffset); 743 growsize, off, statbuf.st_size); 747 growsize, off, statbuf.st_size); 827 if (statbuf.st_size - sparseoffset > SIZE_MAX) { 831 mapsize = (size_t) (statbuf.st_size - sparseoffset); 864 statbuf.st_size); 868 statbuf.st_size);
|