Searched refs:mmap_size (Results 1 – 2 of 2) sorted by relevance
/frameworks/native/libs/vr/libbroadcastring/include/libbroadcastring/ |
D | broadcast_ring.h | 177 static BroadcastRing Create(void* mmap, size_t mmap_size, in Create() argument 180 CHECK(ring.ValidateGeometry(mmap_size, sizeof(Record), record_count)); in Create() 189 static BroadcastRing Create(void* mmap, size_t mmap_size) { in Create() argument 190 return Create(mmap, mmap_size, in Create() 193 : BroadcastRing::GetRecordCount(mmap_size)); in Create() 200 static std::tuple<BroadcastRing, bool> Import(void* mmap, size_t mmap_size) { in Import() argument 204 if (mmap_size >= sizeof(Header)) { in Import() 210 bool ok = ring.ValidateGeometry(mmap_size, record_size, record_count); in Import() 248 static uint32_t GetRecordCount(size_t mmap_size) { in GetRecordCount() argument 249 if (mmap_size <= sizeof(Header)) { in GetRecordCount() [all …]
|
/frameworks/native/libs/vr/libbroadcastring/ |
D | broadcast_ring_test.cc | 571 size_t mmap_size = (ring_size + (page_size - 1)) & ~(page_size - 1); in TEST() local 572 ASSERT_GE(mmap_size, ring_size); in TEST() 574 void* mmap_base = mmap(nullptr, mmap_size, PROT_READ | PROT_WRITE, in TEST() 578 Ring ring = Ring::Create(mmap_base, mmap_size, record_count); in TEST() 581 ASSERT_EQ(0, mprotect(mmap_base, mmap_size, PROT_READ)); in TEST() 586 std::tie(imported_ring, import_ok) = Ring::Import(mmap_base, mmap_size); in TEST() 600 ASSERT_EQ(0, munmap(mmap_base, mmap_size)); in TEST() 611 size_t mmap_size = (ring_size + (page_size - 1)) & ~(page_size - 1); in TEST() local 612 ASSERT_GE(mmap_size, ring_size); in TEST() 614 void* mmap_base = mmap(nullptr, mmap_size, PROT_READ | PROT_WRITE, in TEST() [all …]
|