/bionic/tests/ |
D | buffer_tests.cpp | 362 size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); in RunSingleBufferOverreadTest() local 364 ASSERT_TRUE(posix_memalign(reinterpret_cast<void**>(&memory), pagesize, in RunSingleBufferOverreadTest() 365 2*pagesize) == 0); in RunSingleBufferOverreadTest() 366 memset(memory, 0x23, 2*pagesize); in RunSingleBufferOverreadTest() 369 ASSERT_TRUE(MprotectHeap(&memory[pagesize], pagesize, PROT_NONE) == 0); in RunSingleBufferOverreadTest() 371 for (size_t i = 0; i < pagesize; i++) { in RunSingleBufferOverreadTest() 372 uint8_t* buf = &memory[pagesize-i]; in RunSingleBufferOverreadTest() 376 ASSERT_TRUE(MprotectHeap(&memory[pagesize], pagesize, PROT_READ | PROT_WRITE) == 0); in RunSingleBufferOverreadTest() 383 size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); in RunSrcDstBufferOverreadTest() local 385 ASSERT_TRUE(posix_memalign(reinterpret_cast<void**>(&memory), pagesize, in RunSrcDstBufferOverreadTest() [all …]
|
D | sys_mman_test.cpp | 100 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local 104 ASSERT_NE(-1, lseek(tf.fd, pagesize, SEEK_SET)); in TEST() 106 ASSERT_NE(-1, lseek(tf.fd, 2 * pagesize, SEEK_SET)); in TEST() 108 ASSERT_NE(-1, lseek(tf.fd, 3 * pagesize - sizeof(END_MSG), SEEK_SET)); in TEST() 113 void* map = mmap(nullptr, pagesize, PROT_READ, MAP_SHARED, tf.fd, pagesize); in TEST() 119 ASSERT_EQ(0, munmap(map, pagesize)); in TEST() 121 map = mmap(nullptr, pagesize, PROT_READ, MAP_SHARED, tf.fd, 2 * pagesize); in TEST() 126 ASSERT_STREQ(END_MSG, data+pagesize-sizeof(END_MSG)); in TEST() 128 ASSERT_EQ(0, munmap(map, pagesize)); in TEST() 136 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local [all …]
|
D | malloc_test.cpp | 333 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local 336 ASSERT_TRUE((reinterpret_cast<uintptr_t>(ptr) & (pagesize-1)) == 0); in TEST() 337 ASSERT_LE(pagesize, malloc_usable_size(ptr)); in TEST() 354 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local 357 ASSERT_TRUE((reinterpret_cast<uintptr_t>(ptr) & (pagesize-1)) == 0); in TEST()
|
/bionic/benchmarks/ |
D | malloc_benchmark.cpp | 41 static int pagesize = getpagesize(); in BM_mallopt_purge() local 49 for (size_t allocated = 0; allocated < 2 * static_cast<size_t>(pagesize); allocated += size) { in BM_mallopt_purge() 54 MakeAllocationResident(ptr, size, pagesize); in BM_mallopt_purge()
|
D | stdlib_benchmark.cpp | 29 int pagesize = getpagesize(); in MallocFree() local 34 MakeAllocationResident(ptr, nbytes, pagesize); in MallocFree() 64 int pagesize = getpagesize(); in CallocFree() local 69 MakeAllocationResident(ptr, nbytes, pagesize); in CallocFree() 98 int pagesize = getpagesize(); in MallocMultiple() local 103 MakeAllocationResident(ptrs[i], nbytes, pagesize); in MallocMultiple()
|
D | util.h | 75 void* ptr, size_t nbytes, int pagesize) { in MakeAllocationResident() argument 77 for (size_t i = 0; i < nbytes; i += pagesize) { in MakeAllocationResident()
|
/bionic/libc/bionic/ |
D | jemalloc_wrapper.cpp | 27 size_t pagesize = getpagesize(); in je_pvalloc() local 28 size_t size = __BIONIC_ALIGN(bytes, pagesize); in je_pvalloc() 32 return je_memalign(pagesize, size); in je_pvalloc()
|
/bionic/libc/malloc_hooks/ |
D | malloc_hooks.cpp | 232 size_t pagesize = getpagesize(); in hooks_pvalloc() local 233 size_t size = __BIONIC_ALIGN(bytes, pagesize); in hooks_pvalloc() 239 return hooks_memalign(pagesize, size); in hooks_pvalloc()
|
/bionic/libc/kernel/uapi/asm-arm/asm/ |
D | setup.h | 31 __u32 pagesize; member
|
/bionic/libc/malloc_debug/ |
D | malloc_debug.cpp | 942 size_t pagesize = getpagesize(); in debug_pvalloc() local 943 size_t size = __BIONIC_ALIGN(bytes, pagesize); in debug_pvalloc() 949 return debug_memalign(pagesize, size); in debug_pvalloc()
|
/bionic/libc/malloc_debug/tests/ |
D | malloc_debug_unit_tests.cpp | 2111 size_t pagesize = getpagesize(); in TEST_F() local 2114 ASSERT_EQ(pagesize, debug_malloc_usable_size(pointer)); in TEST_F() 2115 uintptr_t value = reinterpret_cast<uintptr_t>(pointer) & (pagesize - 1); in TEST_F() 2123 size_t pagesize = getpagesize(); in TEST_F() local 2127 uintptr_t value = reinterpret_cast<uintptr_t>(pointer) & (pagesize - 1); in TEST_F()
|