Home
last modified time | relevance | path

Searched refs:pagesize (Results 1 – 9 of 9) sorted by relevance

/bionic/tests/
Dbuffer_tests.cpp362 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 …]
Dsys_mman_test.cpp100 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 …]
Dmalloc_test.cpp317 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/
Dstdlib_benchmark.cpp32 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/
Djemalloc_wrapper.cpp27 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/
Dmalloc_hooks.cpp232 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/
Dsetup.h31 __u32 pagesize; member
/bionic/libc/malloc_debug/
Dmalloc_debug.cpp881 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/
Dmalloc_debug_unit_tests.cpp2109 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()