/third_party/ltp/testcases/kernel/syscalls/madvise/ |
H A D | madvise02.c | 93 if (mlock(file1, st.st_size) < 0) in tcases_filter() 140 file1 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup() 141 file2 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup() 142 file3 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in setup() 148 ptr_addr = SAFE_MALLOC(st.st_size); in setup() 152 SAFE_MUNMAP(file2 + st.st_size - pagesize, pagesize); in setup() 168 TEST(madvise(*(tc->addr), st.st_size, tc->advice)); in advice_test() 186 SAFE_MUNMAP(file1, st.st_size); in cleanup() 187 SAFE_MUNMAP(file2, st.st_size - pagesize); in cleanup() 188 SAFE_MUNMAP(file3, st.st_size); in cleanup() [all...] |
H A D | madvise01.c | 79 sfile = SAFE_MMAP(NULL, st.st_size, in setup() 84 amem = SAFE_MMAP(NULL, st.st_size, in setup() 92 SAFE_MUNMAP(sfile, st.st_size); in cleanup() 93 SAFE_MUNMAP(amem, st.st_size); in cleanup() 101 TEST(madvise(*(tc->addr), st.st_size, tc->advice)); in verify_madvise()
|
/third_party/ltp/testcases/kernel/syscalls/sendfile/ |
H A 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/src/time/ |
H A D | __map_file.c | 19 map = __mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in __map_file() 20 *size = st.st_size; in __map_file() 47 map = __mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in __map_tzdata_file() 48 *tzdata_size = st.st_size; in __map_tzdata_file() 72 __munmap((void *)map, st.st_size); in __map_tzdata_file()
|
/third_party/elfutils/libdwfl/ |
H A D | dwfl_module_addrsym.c | 46 Here we store only symbols with nonzero st_size. */ 52 /* Keep track of an eligible symbol with st_size == 0 as a fallback. */ 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() 165 st_size. If no symbol with proper size includes in try_sym_value() 179 else if (sym->st_size != 0 in try_sym_value() 181 && ((state->closest_sym->st_size > sy in try_sym_value() [all...] |
/third_party/musl/libc-test/src/functionalext/supplement/mman/ |
H A 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_REA in mmap_0700() [all...] |
/third_party/libsnd/tests/ |
H A D | win32_test.c | 109 if (sizeof (statbuf.st_size) != sizeof (INT64)) in show_fstat_error() 110 { printf ("\n\nLine %d: Error, sizeof (statbuf.st_size) != 8.\n\n", __LINE__) ; 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/libwebsockets/lib/misc/lwsac/ |
H A 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/ltp/testcases/kernel/syscalls/splice/ |
H A 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/elfutils/lib/ |
H A 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/pwrite/ |
H A 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/ltp/testcases/kernel/syscalls/write/ |
H A 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/skia/third_party/externals/libjpeg-turbo/md5/ |
H A 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/rust/crates/regex/regex-capi/examples/ |
H A 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/ltp/testcases/kernel/syscalls/init_module/ |
H A 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/musl/libc-test/src/functionalext/supplement/mman/mman_gtest/ |
H A D | mman_mmap_test.cpp | 97 void* mmapping = mmap(nullptr, sb.st_size, PROT_NONE, MAP_PRIVATE | MAP_FIXED, -1, 0); in HWTEST_F() 116 void* mmapping = mmap(nullptr, sb.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in HWTEST_F() 120 int unmapResult = munmap(mmapping, sb.st_size); in HWTEST_F() 137 void* mmapping = mmap(nullptr, sb.st_size, PROT_EXEC, MAP_PRIVATE | MAP_LOCKED, fd, 0); in HWTEST_F() 141 int unmapResult = munmap(mmapping, sb.st_size); in HWTEST_F()
|
/third_party/node/test/wasi/c/ |
H A 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/vixl/examples/aarch32/ |
H A 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/toybox/toys/pending/ |
H A 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/elfutils/libelf/ |
H A D | elf_readall.c | 97 if (sizeof (size_t) >= sizeof (st.st_size) in __libelf_readall() 98 || st.st_size <= ~((size_t) 0)) in __libelf_readall() 99 elf->maximum_size = (size_t) st.st_size; in __libelf_readall()
|
/third_party/musl/libc-test/src/functionalext/supplement/unistd/ |
H A 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()
|
H A D | readlink.c | 33 buf = malloc(sb.st_size + MALLOCLENGTH); in readlink_0100() 66 buf = malloc(sb.st_size + MALLOCLENGTH); in readlink_0200() 97 buf = malloc(sb.st_size + MALLOCLENGTH); in readlink_0300()
|
/third_party/node/deps/openssl/openssl/fuzz/ |
H A 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/openssl/fuzz/ |
H A 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/toybox/toys/posix/ |
H A D | split.c | 45 st.st_size = 0; in do_split() 48 if (TT.n && (TT.b = st.st_size/TT.n)<1) return error_msg("%s: no size", in); in do_split() 69 bytesleft = TT.b + ((filenum == TT.n) ? st.st_size%TT.n : 0); in do_split()
|