Home
last modified time | relevance | path

Searched refs:kPageSize (Results 1 – 25 of 66) sorted by relevance

123

/external/v8/src/heap/
Dremembered-set.h33 slot_set[offset / Page::kPageSize].Insert<access_mode>(offset % in Insert()
34 Page::kPageSize); in Insert()
46 return slot_set[offset / Page::kPageSize].Contains(offset % in Contains()
47 Page::kPageSize); in Contains()
58 slot_set[offset / Page::kPageSize].Remove(offset % Page::kPageSize); in Remove()
71 if (end_offset < static_cast<uintptr_t>(Page::kPageSize)) { in RemoveRange()
77 int start_chunk = static_cast<int>(start_offset / Page::kPageSize); in RemoveRange()
78 int end_chunk = static_cast<int>((end_offset - 1) / Page::kPageSize); in RemoveRange()
80 static_cast<int>(start_offset % Page::kPageSize); in RemoveRange()
84 end_offset - static_cast<uintptr_t>(end_chunk) * Page::kPageSize); in RemoveRange()
[all …]
/external/compiler-rt/lib/tsan/rtl/
Dtsan_sync.cc130 const uptr kPageSize = GetPageSizeCached() * kMetaRatio; in ResetRange() local
131 if (sz <= 4 * kPageSize) { in ResetRange()
137 uptr diff = RoundUp(p, kPageSize) - p; in ResetRange()
143 diff = p + sz - RoundDown(p + sz, kPageSize); in ResetRange()
150 CHECK_EQ(p, RoundUp(p, kPageSize)); in ResetRange()
151 CHECK_EQ(sz, RoundUp(sz, kPageSize)); in ResetRange()
155 for (uptr checked = 0; sz > 0; checked += kPageSize) { in ResetRange()
156 bool has_something = FreeRange(proc, p, kPageSize); in ResetRange()
157 p += kPageSize; in ResetRange()
158 sz -= kPageSize; in ResetRange()
[all …]
Dtsan_mman.cc45 const uptr kPageSize = GetPageSizeCached() * kMetaRatio; in OnUnmap() local
48 CHECK_GE(size, 2 * kPageSize); in OnUnmap()
49 uptr diff = RoundUp(p, kPageSize) - p; in OnUnmap()
54 diff = p + size - RoundDown(p + size, kPageSize); in OnUnmap()
/external/compiler-rt/test/asan/TestCases/Posix/
Dlarge_allocator_unpoisons_on_free.cc27 const long kPageSize = sysconf(_SC_PAGESIZE); in main() local
28 void *p = my_memalign(kPageSize, 1024 * 1024); in main()
31 char *q = (char *)mmap(p, kPageSize, PROT_READ | PROT_WRITE, in main()
35 memset(q, 42, kPageSize); in main()
37 munmap(q, kPageSize); in main()
/external/perfetto/src/tracing/ipc/
Dposix_shared_memory_unittest.cc45 factory.CreateSharedMemory(base::kPageSize); in TEST()
49 ASSERT_EQ(base::kPageSize, shm_size); in TEST()
60 PosixSharedMemory::Create(base::kPageSize); in TEST()
63 ASSERT_EQ(static_cast<off_t>(base::kPageSize), lseek(fd, 0, SEEK_END)); in TEST()
72 ASSERT_EQ(0, ftruncate(fd_num, base::kPageSize)); in TEST()
80 ASSERT_EQ(base::kPageSize, shm_size); in TEST()
/external/perfetto/src/ipc/
Dbuffered_frame_deserializer.cc42 PERFETTO_CHECK(max_capacity % base::kPageSize == 0); in BufferedFrameDeserializer()
43 PERFETTO_CHECK(max_capacity > base::kPageSize); in BufferedFrameDeserializer()
60 buf_.AdviseDontNeed(buf() + base::kPageSize, capacity_ - base::kPageSize); in BeginReceive()
143 if (consumed_size > base::kPageSize) { in EndReceive()
144 size_t size_rounded_up = (size_ / base::kPageSize + 1) * base::kPageSize; in EndReceive()
/external/perfetto/src/traced/probes/ftrace/
Dpage_pool_unittest.cc39 std::generate(page, page + base::kPageSize, rnd_engine); in TEST()
57 char expected[base::kPageSize]; in TEST()
59 std::generate(expected, expected + base::kPageSize, rnd_engine); in TEST()
77 page.resize(base::kPageSize); in TEST()
85 memcpy(dst, expected_page.data(), base::kPageSize); in TEST()
100 std::string(page, base::kPageSize)); in TEST()
Dcpu_reader_fuzzer.cc33 uint8_t g_page[base::kPageSize];
42 protozero::ScatteredStreamWriterNullDelegate delegate(base::kPageSize); in FuzzCpuReaderParsePage()
52 memset(g_page, 0, base::kPageSize); in FuzzCpuReaderParsePage()
53 memcpy(g_page, data, std::min(base::kPageSize, size)); in FuzzCpuReaderParsePage()
Dcpu_reader.cc120 const uint8_t* end_of_page = *ptr + base::kPageSize; in ParsePageHeader()
136 PERFETTO_DCHECK(page_header.size <= base::kPageSize); in ParsePageHeader()
238 constexpr auto kPageSize = base::kPageSize; in RunWorkerThread() local
256 res = splice(trace_fd, nullptr, *sync_pipe.wr, nullptr, kPageSize, flg); in RunWorkerThread()
261 ssize_t rdres = read(*sync_pipe.rd, pool_page, kPageSize); in RunWorkerThread()
267 res = read(trace_fd, pool_page, kPageSize); in RunWorkerThread()
287 PERFETTO_DCHECK(hdr && hdr->size > 0 && hdr->size <= base::kPageSize); in RunWorkerThread()
296 PERFETTO_DCHECK(res == base::kPageSize || mode == kRead); in RunWorkerThread()
444 const uint8_t* const end_of_page = ptr + base::kPageSize; in ParsePage()
Dpage_pool.h78 static constexpr size_t kBlockSize = kPagesPerBlock * base::kPageSize;
93 return reinterpret_cast<uint8_t*>(mem_.Get()) + i * base::kPageSize; in At()
/external/perfetto/src/profiling/memory/
Dshared_ring_buffer_unittest.cc104 data = std::string(base::kPageSize - sizeof(uint64_t), '#'); in StructuredTest()
149 constexpr auto kBufSize = base::kPageSize * 4; in TEST()
160 constexpr auto kBufSize = base::kPageSize * 4; in TEST()
176 constexpr auto kBufSize = base::kPageSize * 4; in TEST()
182 constexpr auto kBufSize = base::kPageSize * 4; in TEST()
190 constexpr auto kBufSize = base::kPageSize * 1024; // 4 MB in TEST()
204 std::uniform_int_distribution<size_t> dist(1, base::kPageSize * 8); in TEST()
259 constexpr auto kBufSize = base::kPageSize * 4 + 1; in TEST()
265 constexpr auto kBufSize = base::kPageSize * 4; in TEST()
Dshared_ring_buffer_fuzzer.cc57 (payload_size + base::kPageSize - 1) / base::kPageSize; in FuzzRingBuffer()
69 base::kPageSize)) == 0); in FuzzRingBuffer()
71 PERFETTO_CHECK(lseek(*fd, base::kPageSize, SEEK_SET) != -1); in FuzzRingBuffer()
Dshared_ring_buffer_write_fuzzer.cc62 (payload_size + base::kPageSize - 1) / base::kPageSize; in FuzzRingBufferWrite()
74 base::kPageSize)) == 0); in FuzzRingBufferWrite()
77 PERFETTO_CHECK(lseek(*fd, base::kPageSize, SEEK_SET) != -1); in FuzzRingBufferWrite()
Dshared_ring_buffer.cc43 constexpr auto kMetaPageSize = base::kPageSize;
46 constexpr auto kGuardSize = base::kPageSize * 1024 * 16; // 64 MB.
134 if (size_with_meta < 2 * base::kPageSize || size % base::kPageSize || in Initialize()
/external/perfetto/src/base/test/
Dvm_test_utils.cc43 EXPECT_EQ(0u, size % kPageSize); in IsMapped()
88 kPageSize); in IsMapped()
93 if (pages_found * kPageSize == size) in IsMapped()
107 const size_t num_pages = size / kPageSize; in IsMapped()
/external/compiler-rt/test/tsan/
Dlarge_malloc_meta.cc16 const int kPageSize = 4 << 10; in main() local
18 for (int j = 0; j < kSize; j += kPageSize / sizeof(*p)) in main()
21 mmap(0, kSize * sizeof(*p) + kPageSize, PROT_NONE, MAP_PRIVATE | MAP_ANON, in main()
/external/google-breakpad/src/client/windows/unittests/
Dexception_handler_death_test.cc416 const DWORD kPageSize = sSysInfo.dwPageSize; in TEST_F() local
423 kPageSize * 2, in TEST_F()
427 char* memory = all_memory + kPageSize; in TEST_F()
428 ASSERT_TRUE(VirtualAlloc(memory, kPageSize, in TEST_F()
508 const DWORD kPageSize = sSysInfo.dwPageSize; in TEST_F() local
511 const int kOffset = kPageSize - sizeof(instructions); in TEST_F()
515 kPageSize * 2, in TEST_F()
519 ASSERT_TRUE(VirtualAlloc(memory, kPageSize, in TEST_F()
/external/libtextclassifier/utils/memory/
Dmmap.cc86 static const int64 kPageSize = sysconf(_SC_PAGE_SIZE); in MmapFile() local
87 const int64 aligned_offset = (segment_offset / kPageSize) * kPageSize; in MmapFile()
/external/libchrome/base/
Dsecurity_unittest.cc127 size_t kPageSize = 4096; // We support x86_64 only. in TEST() local
134 mmap(nullptr, kPageSize, PROT_READ | PROT_WRITE, in TEST()
138 ASSERT_EQ(munmap(default_mmap_heap_address, kPageSize), 0); in TEST()
/external/libchrome/base/memory/
Dshared_memory_region_unittest.cc154 const size_t kPageSize = SysInfo::VMAllocationGranularity(); in TYPED_TEST() local
155 ASSERT_TRUE(kPageSize >= sizeof(uint32_t)); in TYPED_TEST()
156 ASSERT_EQ(kPageSize % sizeof(uint32_t), 0U); in TYPED_TEST()
157 const size_t kDataSize = kPageSize * 2; in TYPED_TEST()
171 off_t bytes_offset = kPageSize; in TYPED_TEST()
/external/perfetto/src/base/
Dpaged_memory.cc36 constexpr size_t kGuardSize = kPageSize;
39 constexpr size_t kCommitChunkSize = kPageSize * 1024; // 4mB
46 PERFETTO_DCHECK(size % kPageSize == 0); in Allocate()
/external/ltp/testcases/kernel/mem/mmapstress/
Dmmap-corruption01.c64 int kPageSize = 4096; variable
160 if (!byte_good && ((i % kPageSize) == 0)) { in main()
/external/compiler-rt/lib/asan/tests/
Dasan_test.cc78 int pm_res = posix_memalign((void**)&pm, kPageSize, kPageSize); in TEST()
84 int *ma = (int*)memalign(kPageSize, kPageSize); in TEST()
85 EXPECT_EQ(0U, (uintptr_t)ma % kPageSize); in TEST()
123 EXPECT_EQ(0U, (uintptr_t)a % kPageSize); in TEST()
130 char *a = (char*)pvalloc(kPageSize + 100); in TEST()
131 EXPECT_EQ(0U, (uintptr_t)a % kPageSize); in TEST()
132 a[kPageSize + 101] = 1; // we should not report an error here. in TEST()
136 EXPECT_EQ(0U, (uintptr_t)a % kPageSize); in TEST()
/external/perfetto/src/traced/probes/ftrace/test/
Dcpu_reader_support.cc72 auto buffer = std::unique_ptr<uint8_t[]>(new uint8_t[base::kPageSize]); in PageFromXxd()
74 memset(buffer.get(), 0xfa, base::kPageSize); in PageFromXxd()
/external/perfetto/src/tracing/core/
Dtrace_writer_for_testing.cc30 : delegate_(static_cast<size_t>(base::kPageSize), in TraceWriterForTesting()
31 static_cast<size_t>(base::kPageSize)), in TraceWriterForTesting()

123