/bionic/tests/ |
sys_mman_test.cpp | 99 size_t pagesize = sysconf(_SC_PAGESIZE); local 103 ASSERT_NE(-1, lseek(tf.fd, pagesize, SEEK_SET)); 105 ASSERT_NE(-1, lseek(tf.fd, 2 * pagesize, SEEK_SET)); 107 ASSERT_NE(-1, lseek(tf.fd, 3 * pagesize - sizeof(END_MSG), SEEK_SET)); 112 void* map = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, tf.fd, pagesize); 118 ASSERT_EQ(0, munmap(map, pagesize)); 120 map = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, tf.fd, 2 * pagesize); 125 ASSERT_STREQ(END_MSG, data+pagesize-sizeof(END_MSG)) 135 size_t pagesize = sysconf(_SC_PAGESIZE); local 178 size_t pagesize = sysconf(_SC_PAGESIZE); local 199 size_t pagesize = sysconf(_SC_PAGESIZE); local [all...] |
buffer_tests.cpp | 354 size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); local 356 ASSERT_TRUE(posix_memalign(reinterpret_cast<void**>(&memory), pagesize, 357 2*pagesize) == 0); 358 memset(memory, 0x23, 2*pagesize); 361 ASSERT_TRUE(mprotect(&memory[pagesize], pagesize, PROT_NONE) == 0); 363 for (size_t i = 0; i < pagesize; i++) { 364 uint8_t* buf = &memory[pagesize-i]; 368 ASSERT_TRUE(mprotect(&memory[pagesize], pagesize, PROT_READ | PROT_WRITE) == 0) 375 size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); local 401 size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); local [all...] |
/external/toybox/toys/other/ |
mkswap.c | 20 int fd = xopen(*toys.optargs, O_RDWR), pagesize = sysconf(_SC_PAGE_SIZE); local 22 unsigned int pages = (len/pagesize)-1, *swap = (unsigned int *)toybuf; 31 xlseek(fd, pagesize-10, SEEK_SET); 37 printf("Swapspace size: %luk\n", pages*(unsigned long)(pagesize/1024));
|
/external/strace/tests/ |
mmap.c | 14 const intmax_t pagesize = sysconf(_SC_PAGESIZE); local 15 const unsigned long length = pagesize * 3; 21 offset = 0xcafedeadbeef000 & -pagesize; 22 addr = (void *) (uintmax_t) (0xfacefeed000 & -pagesize); 24 offset = 0xdeadbeef000 & -pagesize; 25 addr = (void *) (unsigned int) (0xfaced000 & -pagesize);
|
pc.c | 13 const unsigned long pagesize = sysconf(_SC_PAGESIZE); local 36 const unsigned long mask = ~(pagesize - 1); 38 unsigned long size = pagesize << 1; 71 (void) sendfile(1, 0, NULL, pagesize);
|
/external/compiler-rt/lib/builtins/ |
enable_execute_stack.c | 44 /* On Darwin, pagesize is always 4096 bytes */ 45 const uintptr_t pageSize = 4096; 49 const uintptr_t pageSize = sysconf(_SC_PAGESIZE); 52 const uintptr_t pageAlignMask = ~(pageSize-1); 55 unsigned char* endPage = (unsigned char*)((p+TRAMPOLINE_SIZE+pageSize) & pageAlignMask);
|
/system/extras/libpagemap/ |
pm_map.c | 47 usage.vss += map->proc->ker->pagesize; 67 usage.rss += (count >= 1) ? map->proc->ker->pagesize : (0); 68 usage.pss += (count >= 1) ? (map->proc->ker->pagesize / count) : (0); 69 usage.uss += (count == 1) ? (map->proc->ker->pagesize) : (0); 71 usage.swap += map->proc->ker->pagesize; 116 ws.vss += map->proc->ker->pagesize; 118 ws.rss += (count >= 1) ? (map->proc->ker->pagesize) : (0); 119 ws.pss += (count >= 1) ? (map->proc->ker->pagesize / count) : (0); 120 ws.uss += (count == 1) ? (map->proc->ker->pagesize) : (0);
|
/system/core/mkbootimg/ |
mkbootimg.c | 68 " [ --pagesize <pagesize> ]\n" 87 int write_padding(int fd, unsigned pagesize, unsigned itemsize) 89 unsigned pagemask = pagesize - 1; 96 count = pagesize - (itemsize & pagemask); 118 uint32_t pagesize = 2048; local 167 } else if(!strcmp(arg,"--pagesize")) { 168 pagesize = strtoul(val, 0, 10); 169 if ((pagesize != 2048) && (pagesize != 4096 [all...] |
/bionic/libc/bionic/ |
jemalloc_wrapper.cpp | 24 size_t pagesize = getpagesize(); local 25 size_t size = BIONIC_ALIGN(bytes, pagesize); 29 return je_memalign(pagesize, size);
|
/external/bison/m4/ |
memchr.m4 | 56 int pagesize = getpagesize (); 58 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, 61 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) 62 fence = two_pages + pagesize;
|
/system/extras/tests/pagingtest/ |
thrashing_test.c | 23 long pagesize; local 28 pagesize = sysconf(_SC_PAGE_SIZE); 34 filesize = num_pages * pagesize / (ARRAY_SIZE(fds) - 1); 56 for (k = ((filesize - 1) & ~(pagesize - 1)); k >= 0; k -= pagesize) {
|
pageinout_test.c | 21 long pagesize = sysconf(_SC_PAGE_SIZE); local 49 for (j = ((file_size - 1) & ~(pagesize - 1)); j >= 0; j -= pagesize) {
|
/external/jmonkeyengine/engine/src/core/com/jme3/font/ |
BitmapCharacterSet.java | 48 private int pageSize;
58 oc.write(pageSize, "pageSize", 0);
95 pageSize = ic.readInt("pageSize", 0);
204 ch.setPage(ch.getPage() + this.pageSize);
207 this.pageSize += styleSet.pageSize;
220 void setPageSize(int pageSize) {
221 this.pageSize = pageSize; [all...] |
/external/valgrind/memcheck/tests/ |
descr_belowsp.c | 82 const int pagesize = getpagesize(); local 84 const int pagesize = 4096; // let's say ? 86 return pagesize; 91 const int pagesize = guess_pagesize(); local 95 (void*) VG_ROUNDUP(lowest_j, pagesize)); 97 (void*) VG_ROUNDUP(lowest_j, pagesize)-1); 99 (void*) VG_ROUNDDN(lowest_j, pagesize));
|
/external/valgrind/none/tests/ |
map_unmap.c | 44 static unsigned int pagesize; variable 47 #define LEN (PAGES*pagesize) 67 off = (random() % LEN) & ~(pagesize-1); 70 /* printf("unmapping off=%d\n", off/pagesize); */ 71 munmap((char *)p + off, pagesize); 72 off += 619*pagesize; 90 pagesize = getpagesize();
|
/system/extras/procmem/ |
procmem.c | 47 int pagesize; /* cached for speed */ local 110 pagesize = pm_kernel_pagesize(ker); 193 address = pm_map_start(mi->map) + j * ker->pagesize; 250 mi->shared_clean * pagesize / 1024, 251 mi->shared_dirty * pagesize / 1024, 252 mi->private_clean * pagesize / 1024, 253 mi->private_dirty * pagesize / 1024, 262 mi->shared_clean * pagesize / 1024, 263 mi->shared_dirty * pagesize / 1024, 264 mi->private_clean * pagesize / 1024 [all...] |
/external/compiler-rt/test/asan/TestCases/Linux/ |
stack-overflow-sigbus.cc | 49 const long pagesize = sysconf(_SC_PAGESIZE); local 57 p = mmap((void *)(addr - 4 * pagesize), pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
/external/elfutils/src/lib/ |
crc32_file.c | 55 const size_t pagesize = sysconf (_SC_PAGE_SIZE); local 56 mapsize = ((mapsize / 2) + pagesize - 1) & -pagesize; 57 while (mapsize >= pagesize
|
/external/llvm/lib/Support/Unix/ |
Memory.inc | 91 static const size_t PageSize = Process::getPageSize(); 92 const size_t NumPages = (NumBytes+PageSize-1)/PageSize; 117 if (Start && Start % PageSize) 118 Start += PageSize - Start % PageSize; 120 void *Addr = ::mmap(reinterpret_cast<void*>(Start), PageSize*NumPages, 132 Result.Size = NumPages*PageSize; 184 size_t PageSize = Process::getPageSize(); 185 size_t NumPages = (NumBytes+PageSize-1)/PageSize [all...] |
/frameworks/native/libs/binder/ |
MemoryHeapBase.cpp | 48 const size_t pagesize = getpagesize(); local 49 size = ((size + pagesize-1) & ~(pagesize-1)); 72 const size_t pagesize = getpagesize(); local 73 size = ((size + pagesize-1) & ~(pagesize-1)); 84 const size_t pagesize = getpagesize(); local 85 size = ((size + pagesize-1) & ~(pagesize-1));
|
/system/core/libbacktrace/ |
GetPss.cpp | 67 int pagesize = getpagesize(); local 74 for (size_t page = start/pagesize; page < end/pagesize; page++) { 80 total_pss += (count >= 1) ? pagesize / count : 0;
|
/system/extras/verity/ |
BootSignature.java | 204 int pageSize = image.getInt(); 206 int length = pageSize // include the page aligned image header 207 + ((kernelSize + pageSize - 1) / pageSize) * pageSize 208 + ((ramdskSize + pageSize - 1) / pageSize) * pageSize 209 + ((secondSize + pageSize - 1) / pageSize) * pageSize [all...] |
/external/lldb/tools/debugserver/source/MacOSX/ |
MachVMMemory.cpp | 33 MachVMMemory::PageSize(task_t task) 46 DNBLogThreadedIf(LOG_TASK, "MachVMMemory::PageSize task_info returned page size of 0x%x", (int) vm_info.page_size); 52 DNBLogThreadedIf(LOG_TASK, "MachVMMemory::PageSize task_info call failed to get page size, TASK_VM_INFO %d, TASK_VM_INFO_COUNT %d, kern return %d", TASK_VM_INFO, TASK_VM_INFO_COUNT, kr); 66 const nub_size_t page_size = PageSize(task); 130 //tsamp->pages_stolen = (256 * 1024 * 1024ULL) / tsamp->pagesize; 210 stolenPages = stolen / PageSize (task); 301 vm_size_t pagesize = PageSize (task); 302 rsize = pages_resident * pagesize; 303 dirty_size = pages_dirtied * pagesize; 348 vm_size_t pagesize = PageSize (task); local [all...] |
/external/harfbuzz_ng/test/api/ |
test-blob.c | 119 uintptr_t pagesize = -1; local 122 pagesize = (uintptr_t) sysconf (_SC_PAGE_SIZE); 124 pagesize = (uintptr_t) sysconf (_SC_PAGESIZE); 126 pagesize = (uintptr_t) getpagesize (); 129 g_assert (pagesize != (uintptr_t) -1); 131 return pagesize; 175 uintptr_t pagesize = get_pagesize (); local 177 data = mmap (NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); 180 mprotect ((char *) data, pagesize, PROT_READ);
|
/external/elfutils/src/libdwfl/ |
elf-from-memory.c | 53 PAGESIZE is the minimum page size and alignment used for the PT_LOAD 58 GElf_Xword pagesize, 211 /* Sanity check the segment load aligns with the pagesize. */ 212 if (((vaddr - offset) & (pagesize - 1)) != 0) 215 GElf_Off segment_end = ((offset + filesz + pagesize - 1) 216 & -pagesize); 221 if (!found_base && (offset & -pagesize) == 0) 223 loadbase = ehdr_vma - (vaddr & -pagesize); 288 GElf_Off start = offset & -pagesize; 289 GElf_Off end = (offset + filesz + pagesize - 1) & -pagesize [all...] |