Lines Matching refs:BlockHeader
84 struct PersistentMemoryAllocator::BlockHeader {
114 volatile BlockHeader queue; // Empty block for linked-list head/tail.
138 const volatile BlockHeader* block =
165 const volatile BlockHeader* block =
211 freeptr / (sizeof(BlockHeader) + kAllocAlignment);
264 static_assert(sizeof(BlockHeader) % kAllocAlignment == 0,
265 "BlockHeader is not a multiple of kAllocAlignment");
278 CHECK(((BlockHeader*)0)->next.is_lock_free());
289 volatile BlockHeader* const first_block =
290 reinterpret_cast<volatile BlockHeader*>(mem_base_ +
320 shared_meta()->queue.size = sizeof(BlockHeader);
414 const volatile BlockHeader* const block = GetBlock(ref, 0, 0, false, false);
420 if (size <= sizeof(BlockHeader) || ref + size > mem_size_) {
424 return size - sizeof(BlockHeader);
428 const volatile BlockHeader* const block = GetBlock(ref, 0, 0, false, false);
438 volatile BlockHeader* const block = GetBlock(ref, 0, 0, false, false);
469 if (req_size > kSegmentMaxSize - sizeof(BlockHeader)) {
475 uint32_t size = static_cast<uint32_t>(req_size + sizeof(BlockHeader));
477 if (size <= sizeof(BlockHeader) || size > mem_page_) {
506 volatile BlockHeader* const block = GetBlock(freeptr, 0, 0, false, true);
518 if (page_free <= sizeof(BlockHeader)) {
534 if (page_free - size < sizeof(BlockHeader) + kAllocAlignment)
574 (uint32_t)sizeof(BlockHeader));
576 meminfo->free = IsCorrupt() ? 0 : remaining - sizeof(BlockHeader);
583 volatile BlockHeader* block = GetBlock(ref, 0, 0, false, false);
671 const volatile PersistentMemoryAllocator::BlockHeader*
680 size += sizeof(BlockHeader);
690 const volatile BlockHeader* const block =
691 reinterpret_cast<volatile BlockHeader*>(mem_base_ + ref);
705 return reinterpret_cast<const volatile BlockHeader*>(mem_base_ + ref);
713 const volatile BlockHeader* block =
717 return reinterpret_cast<const volatile char*>(block) + sizeof(BlockHeader);