Lines Matching refs:m_ptr
50 void *m_ptr = nullptr; member in FileMap
67 m_ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, m_fileFd.get(), 0);
68 if ((int)(uintptr_t)m_ptr == -1) {
69 … cout << "Error: mmap failed: " << (int)(uintptr_t)m_ptr << ": " << strerror(errno) << endl;
75 madvise(m_ptr, m_size, MADV_RANDOM);
78 madvise(m_ptr, m_size, MADV_SEQUENTIAL);
82 uint8_t *targetPtr = (uint8_t*)m_ptr + 4096ull * i;
87 uint8_t *targetPtr = (uint8_t*)m_ptr + pageSize * targetPage; in benchRandomRead()
91 uint8_t *targetPtr = (uint8_t*)m_ptr + pageSize * targetPage; in benchRandomWrite()
95 uint8_t *targetPtr = (uint8_t*)m_ptr + pageSize * j; in benchLinearRead()
99 uint8_t *targetPtr = (uint8_t*)m_ptr + pageSize * j; in benchLinearWrite()
103 int ret1 = msync(m_ptr, m_size, MS_SYNC | MS_INVALIDATE); in dropCache()
104 madvise(m_ptr, m_size, MADV_DONTNEED); in dropCache()
108 if (m_ptr) in ~FileMap()
109 munmap(m_ptr, m_size); in ~FileMap()