Home
last modified time | relevance | path

Searched refs:memsize (Results 1 – 25 of 32) sorted by relevance

12

/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_test/
Dcpuset_memory_test.c59 static unsigned long memsize; variable
101 memsize = strtoul(optarg, &end, 10); in process_options()
138 if (!memsize) in process_options()
139 memsize = sysconf(_SC_PAGESIZE); in process_options()
161 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_anon()
165 touch_memory_and_echo_node(p, memsize); in mmap_anon()
168 touch_memory_and_echo_node(p, memsize); in mmap_anon()
169 if (munmap(p, memsize) == -1) in mmap_anon()
190 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_file()
197 touch_memory_and_echo_node(p, memsize); in mmap_file()
[all …]
/third_party/ltp/testcases/kernel/syscalls/mmap/
Dmmap001.c87 unsigned int pages, memsize; in main() local
92 memsize = pages = atoi(m_copt); in main()
94 if (memsize < 1) { in main()
99 memsize *= getpagesize(); /* N PAGES */ in main()
105 memsize = pages = 1000; in main()
106 memsize *= getpagesize(); in main()
110 memsize); in main()
122 if (lseek(fd, memsize, SEEK_SET) != memsize) { in main()
135 array = mmap(0, memsize, PROT_WRITE, MAP_SHARED, fd, 0); in main()
147 for (i = 0; i < memsize; i++) { in main()
[all …]
/third_party/ltp/testcases/kernel/controllers/memcg/functional/
Dmemcg_process.c37 static unsigned long memsize; variable
74 memsize = strtoul(optarg, &end, 10); in process_options()
120 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_anon()
124 touch_memory(p, memsize); in mmap_anon()
126 if (munmap(p, memsize) == -1) in mmap_anon()
147 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_file()
154 touch_memory(p, memsize); in mmap_file()
156 if (munmap(p, memsize) == -1) in mmap_file()
171 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_lock1()
175 touch_memory(p, memsize); in mmap_lock1()
[all …]
/third_party/musl/libc-test/src/functionalext/supplement/linux/
Dmlock2.c27 size_t memsize = 4096; in mlock2_0100() local
28 char *memory = (char *)malloc(memsize); in mlock2_0100()
33 memset(memory, '\0', memsize); in mlock2_0100()
34 int ret = mlock2(memory, memsize, CMPFLAG); in mlock2_0100()
37 munlock(memory, memsize); in mlock2_0100()
49 size_t memsize = 4096; in mlock2_0200() local
51 char *memory = (char *)malloc(memsize); in mlock2_0200()
56 memset(memory, '\0', memsize); in mlock2_0200()
60 munlock(memory, memsize); in mlock2_0200()
/third_party/musl/libc-test/src/functionalext/supplement/mman/
Dmlockall.c27 size_t memsize = 4096; in mlockall_0100() local
28 char *memory = (char *)malloc(memsize); in mlockall_0100()
33 memset(memory, '\0', memsize); in mlockall_0100()
51 size_t memsize = 4096; in mlockall_0200() local
52 char *memory = (char *)malloc(memsize); in mlockall_0200()
57 memset(memory, '\0', memsize); in mlockall_0200()
70 size_t memsize = 4096; in mlockall_0300() local
71 char *memory = (char *)malloc(memsize); in mlockall_0300()
76 memset(memory, '\0', memsize); in mlockall_0300()
Dmunlockall.c27 size_t memsize = 4096; in munlockall_0100() local
28 char *memory = (char *)malloc(memsize); in munlockall_0100()
33 memset(memory, '\0', memsize); in munlockall_0100()
52 size_t memsize = 4096; in munlockall_0200() local
53 char *memory = (char *)malloc(memsize); in munlockall_0200()
58 memset(memory, '\0', memsize); in munlockall_0200()
Dmlock.c28 size_t memsize = 4096; in mlock_0100() local
29 char *memory = (char *)malloc(memsize); in mlock_0100()
34 memset(memory, '\0', memsize); in mlock_0100()
35 int result = mlock(memory, memsize); in mlock_0100()
38 munlock(memory, memsize); in mlock_0100()
/third_party/ltp/testcases/kernel/mem/mem/
Dmem02.c83 int memsize = MEMSIZE; /* Size of memory to allocate */ in main() local
95 memsize = atoi(optarg) * 1024 * 1024; in main()
107 if ((pm2 = pm1 = calloc(memsize, 1)) == NULL) { in main()
110 memsize / 1024 / 1024); in main()
113 for (i = 0; i < memsize; i++) in main()
120 for (i = 0; i < memsize; i++) in main()
123 for (i = 0; i < memsize; i++) in main()
132 memsize / 1024 / 1024); in main()
137 if ((pm2 = pm1 = malloc(memsize)) == NULL) { in main()
141 for (i = 0; i < memsize; i++) in main()
[all …]
/third_party/ltp/testcases/kernel/syscalls/mremap/
Dmremap01.c92 int memsize; /* memory mapped size */ variable
113 addr = mremap(addr, memsize, newsize, MREMAP_MAYMOVE); in main()
171 memsize = (1000 * pagesz); in setup()
174 newsize = (memsize * 2); in setup()
184 if (lseek(fildes, (off_t) memsize, SEEK_SET) != (off_t) memsize) { in setup()
186 "lseeking to %d offset pos. failed", memsize); in setup()
198 addr = mmap(0, memsize, PROT_WRITE, MAP_SHARED, fildes, 0); in setup()
Dmremap02.c86 int memsize; /* memory mapped size */ variable
111 addr = mremap(addr, memsize, newsize, MREMAP_MAYMOVE); in main()
157 if ((memsize = getpagesize()) < 0) { in setup()
163 newsize = (memsize * 2); in setup()
166 addr = (char *)(addr + (memsize - 1)); in setup()
Dmremap03.c88 int memsize; /* memory mapped size */ variable
113 addr = mremap(bad_addr, memsize, newsize, MREMAP_MAYMOVE); in main()
166 memsize = (1000 * page_sz); in setup()
169 newsize = (memsize * 2); in setup()
Dmremap04.c96 int memsize; /* memory mapped size */ variable
124 addr = mremap(shmaddr, memsize, newsize, 0); in main()
179 if ((memsize = getpagesize()) < 0) { in setup()
185 newsize = (memsize * 2); in setup()
/third_party/ltp/testcases/kernel/controllers/memcg/control/
Dmem_process.c45 unsigned long memsize; variable
59 memsize = strtoul(optarg, &end, 10); in process_options()
68 if (memsize <= 0) in process_options()
80 for (i = 0; i < (int)memsize; i += pagesize) in touch_memory()
89 if (munmap(p, memsize) == -1) in mem_map()
92 p = mmap(NULL, memsize, PROT_READ | PROT_WRITE, in mem_map()
/third_party/ltp/testcases/kernel/controllers/memcg/stress/
Dmemcg_process_stress.c19 unsigned long memsize; variable
39 nr_page = ceil((double)memsize / pagesize); in sigusr_handler()
69 memsize = strtoul(argv[1], &end, 10); in main()
72 memsize = memsize * 1024 * 1024; in main()
/third_party/skia/third_party/externals/angle2/src/common/third_party/xxhash/
Dxxhash.c467 if (state->memsize + len < 16) { /* fill in tmp buffer */ in XXH32_update_endian()
468 XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, len); in XXH32_update_endian()
469 state->memsize += (unsigned)len; in XXH32_update_endian()
473 if (state->memsize) { /* some data left from previous update */ in XXH32_update_endian()
474 XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, 16-state->memsize); in XXH32_update_endian()
481 p += 16-state->memsize; in XXH32_update_endian()
482 state->memsize = 0; in XXH32_update_endian()
507 state->memsize = (unsigned)(bEnd-p); in XXH32_update_endian()
542 return XXH32_finalize(h32, state->mem32, state->memsize, endian, XXH_aligned); in XXH32_digest_endian()
926 if (state->memsize + len < 32) { /* fill in tmp buffer */ in XXH64_update_endian()
[all …]
Dxxhash.h284 uint32_t memsize; member
296 uint32_t memsize; member
311 unsigned memsize; member
324 unsigned memsize; member
/third_party/lz4/lib/
Dxxhash.c467 if (state->memsize + len < 16) { /* fill in tmp buffer */ in XXH32_update_endian()
468 XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, len); in XXH32_update_endian()
469 state->memsize += (unsigned)len; in XXH32_update_endian()
473 if (state->memsize) { /* some data left from previous update */ in XXH32_update_endian()
474 XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, 16-state->memsize); in XXH32_update_endian()
481 p += 16-state->memsize; in XXH32_update_endian()
482 state->memsize = 0; in XXH32_update_endian()
507 state->memsize = (unsigned)(bEnd-p); in XXH32_update_endian()
542 return XXH32_finalize(h32, state->mem32, state->memsize, endian, XXH_aligned); in XXH32_digest_endian()
926 if (state->memsize + len < 32) { /* fill in tmp buffer */ in XXH64_update_endian()
[all …]
Dxxhash.h272 uint32_t memsize; member
283 uint32_t memsize; member
297 unsigned memsize; member
309 unsigned memsize; member
/third_party/mesa3d/src/util/
Dxxhash.h331 XXH32_hash_t memsize; member
345 XXH32_hash_t memsize; member
884 if (state->memsize + len < 16) { /* fill in tmp buffer */ in XXH32_update()
885 XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, len); in XXH32_update()
886 state->memsize += (XXH32_hash_t)len; in XXH32_update()
890 if (state->memsize) { /* some data left from previous update */ in XXH32_update()
891 XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, 16-state->memsize); in XXH32_update()
898 p += 16-state->memsize; in XXH32_update()
899 state->memsize = 0; in XXH32_update()
924 state->memsize = (unsigned)(bEnd-p); in XXH32_update()
[all …]
/third_party/node/deps/v8/src/base/
Dsys-info.cc68 int64_t memsize = 0; in AmountOfPhysicalMemory() local
69 size_t len = sizeof(memsize); in AmountOfPhysicalMemory()
70 if (sysctl(mib, arraysize(mib), &memsize, &len, nullptr, 0) != 0) { in AmountOfPhysicalMemory()
73 return memsize; in AmountOfPhysicalMemory()
/third_party/gstreamer/gstplugins_bad/ext/wayland/
Dwlshmallocator.c211 gsize offset, size, memsize, maxsize; in gst_wl_shm_memory_construct_wl_buffer() local
227 memsize = gst_memory_get_sizes (mem, &offset, &maxsize); in gst_wl_shm_memory_construct_wl_buffer()
231 g_return_val_if_fail (size <= memsize, NULL); in gst_wl_shm_memory_construct_wl_buffer()
240 memsize); in gst_wl_shm_memory_construct_wl_buffer()
/third_party/curl/lib/
Dmemdebug.c62 static long memsize = 0; /* set number of mallocs allowed */ variable
102 memsize = limit; in curl_dbg_memlimit()
112 if(!memsize) { in countcheck()
124 memsize--; /* countdown */ in countcheck()
/third_party/mesa3d/src/gallium/frontends/nine/
Dnine_csmt_helper.h195 unsigned memsize = sizeof(struct s_##name##_private); \
205 args = nine_queue_alloc(ctx->pool, memsize + memsize2); \
246 unsigned memsize = sizeof(struct s_##name##_private); \
258 args = nine_queue_alloc(ctx->pool, memsize + memsize2); \
297 unsigned memsize = sizeof(struct s_##name##_private); \
307 args = nine_queue_alloc(ctx->pool, memsize + memsize2); \
374 args->_##y = (void *)args + memsize;\
/third_party/nghttp2/third-party/
DMakefile.am483 mruby/mrbgems/mruby-os-memsize/mrbgem.rake \
484 mruby/mrbgems/mruby-os-memsize/test/memsize.rb \
485 mruby/mrbgems/mruby-os-memsize/src/memsize.c \
/third_party/skia/third_party/externals/abseil-cpp/absl/container/
Dfixed_array_test.cc262 EXPECT_THAT(array.memsize(), sizeof(ConstructionTester) * n); in TestArray()
311 ASSERT_EQ(array.memsize(), in TestArrayOfArrays()

12