/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 | 317 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local 320 ASSERT_TRUE((reinterpret_cast<uintptr_t>(ptr) & (pagesize-1)) == 0); in TEST() 321 ASSERT_LE(pagesize, malloc_usable_size(ptr)); in TEST() 330 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local 333 ASSERT_TRUE((reinterpret_cast<uintptr_t>(ptr) & (pagesize-1)) == 0); in TEST()
|
/bionic/benchmarks/ |
D | stdlib_benchmark.cpp | 32 static __always_inline void MakeAllocationResident(void* ptr, size_t nbytes, int pagesize) { in MakeAllocationResident() argument 34 for (size_t i = 0; i < nbytes; i += pagesize) { in MakeAllocationResident() 41 int pagesize = getpagesize(); in MallocFree() local 46 MakeAllocationResident(ptr, nbytes, pagesize); in MallocFree() 75 int pagesize = getpagesize(); in MallocMultiple() local 80 MakeAllocationResident(ptrs[i], nbytes, pagesize); in MallocMultiple()
|
/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 | 881 size_t pagesize = getpagesize(); in debug_pvalloc() local 882 size_t size = __BIONIC_ALIGN(bytes, pagesize); in debug_pvalloc() 888 return debug_memalign(pagesize, size); in debug_pvalloc()
|
/bionic/libc/malloc_debug/tests/ |
D | malloc_debug_unit_tests.cpp | 2109 size_t pagesize = getpagesize(); in TEST_F() local 2112 ASSERT_EQ(pagesize, debug_malloc_usable_size(pointer)); in TEST_F() 2113 uintptr_t value = reinterpret_cast<uintptr_t>(pointer) & (pagesize - 1); in TEST_F() 2121 size_t pagesize = getpagesize(); in TEST_F() local 2125 uintptr_t value = reinterpret_cast<uintptr_t>(pointer) & (pagesize - 1); in TEST_F()
|