Home
last modified time | relevance | path

Searched refs:pagesize (Results 1 – 11 of 11) 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.cpp104 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local
108 ASSERT_NE(-1, lseek(tf.fd, pagesize, SEEK_SET)); in TEST()
110 ASSERT_NE(-1, lseek(tf.fd, 2 * pagesize, SEEK_SET)); in TEST()
112 ASSERT_NE(-1, lseek(tf.fd, 3 * pagesize - sizeof(END_MSG), SEEK_SET)); in TEST()
117 void* map = mmap(nullptr, pagesize, PROT_READ, MAP_SHARED, tf.fd, pagesize); in TEST()
123 ASSERT_EQ(0, munmap(map, pagesize)); in TEST()
125 map = mmap(nullptr, pagesize, PROT_READ, MAP_SHARED, tf.fd, 2 * pagesize); in TEST()
130 ASSERT_STREQ(END_MSG, data+pagesize-sizeof(END_MSG)); in TEST()
132 ASSERT_EQ(0, munmap(map, pagesize)); in TEST()
140 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local
[all …]
Dmalloc_test.cpp365 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local
368 ASSERT_TRUE((reinterpret_cast<uintptr_t>(ptr) & (pagesize-1)) == 0); in TEST()
369 ASSERT_LE(pagesize, malloc_usable_size(ptr)); in TEST()
386 size_t pagesize = sysconf(_SC_PAGESIZE); in TEST() local
389 ASSERT_TRUE((reinterpret_cast<uintptr_t>(ptr) & (pagesize-1)) == 0); in TEST()
/bionic/benchmarks/
Dstdlib_benchmark.cpp30 int pagesize = getpagesize(); in MallocFree() local
35 MakeAllocationResident(ptr, nbytes, pagesize); in MallocFree()
67 int pagesize = getpagesize(); in CallocFree() local
72 MakeAllocationResident(ptr, nbytes, pagesize); in CallocFree()
103 int pagesize = getpagesize(); in MallocMultiple() local
108 MakeAllocationResident(ptrs[i], nbytes, pagesize); in MallocMultiple()
Dmalloc_benchmark.cpp48 static int pagesize = getpagesize(); in RunMalloptPurge() local
56 for (size_t allocated = 0; allocated < 2 * static_cast<size_t>(pagesize); allocated += size) { in RunMalloptPurge()
61 MakeAllocationResident(ptr, size, pagesize); in RunMalloptPurge()
Dutil.h75 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/
Djemalloc_wrapper.cpp37 size_t pagesize = getpagesize(); in je_pvalloc() local
38 size_t size = __BIONIC_ALIGN(bytes, pagesize); in je_pvalloc()
42 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.h19 __u32 pagesize; member
/bionic/libc/malloc_debug/
Dmalloc_debug.cpp1094 size_t pagesize = getpagesize(); in debug_pvalloc() local
1095 size_t size = __BIONIC_ALIGN(bytes, pagesize); in debug_pvalloc()
1101 return debug_memalign(pagesize, size); in debug_pvalloc()
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_unit_tests.cpp2182 size_t pagesize = getpagesize(); in TEST_F() local
2185 ASSERT_EQ(pagesize, debug_malloc_usable_size(pointer)); in TEST_F()
2186 uintptr_t value = reinterpret_cast<uintptr_t>(pointer) & (pagesize - 1); in TEST_F()
2194 size_t pagesize = getpagesize(); in TEST_F() local
2198 uintptr_t value = reinterpret_cast<uintptr_t>(pointer) & (pagesize - 1); in TEST_F()