Home
last modified time | relevance | path

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

12

/external/autotest/client/tests/memory_api/
Dmemory_api.c15 #define ROUND_PAGES(memsize) ((memsize >> (PAGE_SHIFT)) << PAGE_SHIFT) argument
18 #define HALF_MEM(memsize) ((memsize >> (PAGE_SHIFT))<<(PAGE_SHIFT - 1)) argument
26 unsigned int memsize; in main() local
35 memsize = strtoul(argv[1], NULL, 10); in main()
37 memsize = ROUND_PAGES(memsize); in main()
40 if (memsize == 0) { in main()
46 numpages = memsize >> PAGE_SHIFT; in main()
50 mem = sbrk(memsize); in main()
58 memsize, mem); in main()
62 sbrk(-(memsize)); in main()
[all …]
Dmremaps.c12 #define ROUND_PAGES(memsize) ((memsize >> (PAGE_SHIFT)) << PAGE_SHIFT) argument
15 unsigned int memsize; in main() local
24 memsize = strtoul(argv[1], NULL, 10); in main()
26 memsize = ROUND_PAGES(memsize); in main()
29 if (memsize == 0) { in main()
34 numpages = memsize >> PAGE_SHIFT; in main()
36 mem = mmap(0, memsize, PROT_READ | PROT_WRITE, in main()
46 mem = mremap(mem , memsize * (i >> 1), in main()
47 memsize * i, in main()
56 memsize * i, mem); in main()
[all …]
Dmemory_api.py24 def run_once(self, memsize = "1000000000", args=''): argument
33 p1 = subprocess.Popen('%s/memory_api ' % self.tmpdir + memsize,
/external/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 …]
/external/ltp/testcases/kernel/syscalls/mmap/
Dmmap001.c86 unsigned int pages, memsize; in main() local
91 memsize = pages = atoi(m_copt); in main()
93 if (memsize < 1) { in main()
98 memsize *= getpagesize(); /* N PAGES */ in main()
104 memsize = pages = 1000; in main()
105 memsize *= getpagesize(); in main()
109 memsize); in main()
121 if (lseek(fd, memsize, SEEK_SET) != memsize) { in main()
134 array = mmap(0, memsize, PROT_WRITE, MAP_SHARED, fd, 0); in main()
146 for (i = 0; i < memsize; i++) { in main()
[all …]
/external/ltp/testcases/kernel/controllers/memcg/functional/
Dmemcg_process.c53 static unsigned long memsize; variable
90 memsize = strtoul(optarg, &end, 10); in process_options()
136 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_anon()
140 touch_memory(p, memsize); in mmap_anon()
142 if (munmap(p, memsize) == -1) in mmap_anon()
163 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_file()
170 touch_memory(p, memsize); in mmap_file()
172 if (munmap(p, memsize) == -1) in mmap_file()
187 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_lock1()
191 touch_memory(p, memsize); in mmap_lock1()
[all …]
/external/ltp/testcases/kernel/mem/mem/
Dmem02.c75 int memsize = MEMSIZE; /* Size of memory to allocate */ in main() local
87 memsize = atoi(optarg) * 1024 * 1024; in main()
99 if ((pm2 = pm1 = calloc(memsize, 1)) == NULL) { in main()
102 memsize / 1024 / 1024); in main()
105 for (i = 0; i < memsize; i++) in main()
112 for (i = 0; i < memsize; i++) in main()
115 for (i = 0; i < memsize; i++) in main()
124 memsize / 1024 / 1024); in main()
129 if ((pm2 = pm1 = malloc(memsize)) == NULL) { in main()
133 for (i = 0; i < memsize; i++) in main()
[all …]
Dmem01.c150 size_t memsize = 0; /* at first in MB, limited to 4Gb on 32 bits */ in main() local
163 memsize = (size_t) atoi(m_copt) * 1024 * 1024; in main()
165 if (memsize < 1) { in main()
182 memsize = get_memsize(); in main()
183 if (memsize < 1) { in main()
190 bigmalloc = p = malloc(memsize); in main()
194 memsize / 1024 / 1024); in main()
203 memsize / 1024 / 1024, r_opt ? "random" : "linear"); in main()
205 loop_count = memsize / pagesize; in main()
223 (size_t) ((double)(memsize - sizeof(int)) * in main()
[all …]
/external/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.c87 int memsize; /* memory mapped size */ variable
112 addr = mremap(addr, memsize, newsize, MREMAP_MAYMOVE); in main()
158 if ((memsize = getpagesize()) < 0) { in setup()
164 newsize = (memsize * 2); in setup()
167 addr = (char *)(addr + (memsize - 1)); in setup()
Dmremap03.c88 int memsize; /* memory mapped size */ variable
114 addr = mremap(addr, memsize, newsize, MREMAP_MAYMOVE); in main()
167 memsize = (1000 * page_sz); in setup()
170 newsize = (memsize * 2); in setup()
Dmremap04.c97 int memsize; /* memory mapped size */ variable
125 addr = mremap(shmaddr, memsize, newsize, 0); in main()
180 if ((memsize = getpagesize()) < 0) { in setup()
186 newsize = (memsize * 2); in setup()
/external/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 < 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()
/external/ltp/testcases/kernel/controllers/memcg/stress/
Dmemcg_process_stress.c35 unsigned long memsize; variable
55 nr_page = ceil((double)memsize / pagesize); in sigusr_handler()
85 memsize = strtoul(argv[1], &end, 10); in main()
88 memsize = memsize * 1024 * 1024; in main()
/external/fio/crc/
Dxxhash.c272 state->memsize = 0; in XXH32_resetState()
297 if (state->memsize + len < 16) // fill in tmp buffer in XXH32_update_endian()
299 memcpy(state->memory + state->memsize, input, len); in XXH32_update_endian()
300 state->memsize += len; in XXH32_update_endian()
304 if (state->memsize) // some data left from previous update in XXH32_update_endian()
306 memcpy(state->memory + state->memsize, input, 16-state->memsize); in XXH32_update_endian()
314 p += 16-state->memsize; in XXH32_update_endian()
315 state->memsize = 0; in XXH32_update_endian()
343 state->memsize = (int)(bEnd-p); in XXH32_update_endian()
365 uint8_t * bEnd = (uint8_t *)state->memory + state->memsize; in XXH32_intermediateDigest_endian()
/external/vulkan-validation-layers/layers/
Dxxhash.c390 if (state->memsize + len < 16) { /* fill in tmp buffer */ in XXH32_update_endian()
391 XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, len); in XXH32_update_endian()
392 state->memsize += (unsigned)len; in XXH32_update_endian()
396 if (state->memsize) { /* some data left from previous update */ in XXH32_update_endian()
397 XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, 16-state->memsize); in XXH32_update_endian()
404 p += 16-state->memsize; in XXH32_update_endian()
405 state->memsize = 0; in XXH32_update_endian()
430 state->memsize = (unsigned)(bEnd-p); in XXH32_update_endian()
451 const BYTE* const bEnd = (const BYTE*)(state->mem32) + state->memsize; in XXH32_digest_endian()
758 if (state->memsize + len < 32) { /* fill in tmp buffer */ in XXH64_update_endian()
[all …]
Dxxhash.h265 unsigned memsize; member
277 unsigned memsize; member
/external/lz4/lib/
Dxxhash.c391 if (state->memsize + len < 16) { /* fill in tmp buffer */ in XXH32_update_endian()
392 XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, len); in XXH32_update_endian()
393 state->memsize += (unsigned)len; in XXH32_update_endian()
397 if (state->memsize) { /* some data left from previous update */ in XXH32_update_endian()
398 XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, 16-state->memsize); in XXH32_update_endian()
405 p += 16-state->memsize; in XXH32_update_endian()
406 state->memsize = 0; in XXH32_update_endian()
431 state->memsize = (unsigned)(bEnd-p); in XXH32_update_endian()
452 const BYTE* const bEnd = (const BYTE*)(state->mem32) + state->memsize; in XXH32_digest_endian()
759 if (state->memsize + len < 32) { /* fill in tmp buffer */ in XXH64_update_endian()
[all …]
Dxxhash.h265 unsigned memsize; member
277 unsigned memsize; member
/external/v8/src/base/
Dsys-info.cc58 int64_t memsize = 0; in AmountOfPhysicalMemory() local
59 size_t len = sizeof(memsize); in AmountOfPhysicalMemory()
60 if (sysctl(mib, arraysize(mib), &memsize, &len, NULL, 0) != 0) { in AmountOfPhysicalMemory()
63 return memsize; in AmountOfPhysicalMemory()
/external/syslinux/com32/hdt/
Dhdt-cli-memory.c38 unsigned long memsize = 0; in show_memory_e820() local
43 memsize = memsize_e820(map, count); in show_memory_e820()
46 (memsize + (1 << 9)) >> 10, memsize); in show_memory_e820()
Dhdt-dump-memory.c76 unsigned long memsize = 0; in dump_e820() local
81 memsize = memsize_e820(map, count); in dump_e820()
85 add_i("memory.total.size (KiB)", memsize); in dump_e820()
86 add_i("memory.total.size (MiB)", (memsize + (1 << 9)) >> 10); in dump_e820()
/external/curl/lib/
Dmemdebug.c106 static long memsize = 0; /* set number of mallocs allowed */ variable
130 memsize = limit; in curl_memlimit()
140 if(!memsize) { in countcheck()
154 memsize--; /* countdown */ in countcheck()
/external/mesa3d/src/gallium/state_trackers/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;\
/external/ltp/testscripts/
DrunEALtests.sh126 memsize=$(($OPTARG * 1024 * 1024))
127 $LTPROOT/../testcases/bin/genload --vm 0 --vm-bytes $memsize\

12