5#if (defined(__AUTORTFM) && __AUTORTFM)
25 std::byte*
Data =
nullptr;
63 void Grow(
size_t Amount)
69 std::byte* Address()
const
71 return reinterpret_cast<std::byte*
>(
Bits >> 16);
87 static_assert(
sizeof(
uintptr_t) == 8,
"assumption: a pointer is 8 bytes");
88 static_assert(
sizeof(FRecord) == 8);
107 explicit FBlock(
size_t TotalSize)
110 std::byte*
End =
reinterpret_cast<std::byte*
>(
this) + TotalSize;
121 static FBlock* Allocate(
size_t TotalSize)
124 void*
Memory = AutoRTFM::Allocate(TotalSize,
alignof(FBlock));
127 return new (
Memory) FBlock(TotalSize);
134 AutoRTFM::Free(
this);
140 return reinterpret_cast<std::byte*
>(
this) +
sizeof(FBlock);
159 return static_cast<int>(
263 TotalSizeBytes += Entry.Size;
267 if (NumBytes == Entry.Size)
283 Entry.Size -= NumBytes;
284 Entry.LogicalAddress += NumBytes;
285 Entry.Data += NumBytes;
297 (
LIKELY(RemainingBytes) ? (RemainingBytes +
sizeof(FRecord)) : 0);
303 const size_t BlockSize = std::max(AlignedSize,
NextBlockSize);
304 AllocateNewBlock(BlockSize);
315 Entry.Size -= NumBytes;
316 Entry.LogicalAddress += NumBytes;
317 Entry.Data += NumBytes;
321 if (
LIKELY(RemainingBytes))
342 template <
unsigned int SIZE>
348 TotalSizeBytes += SIZE;
364 template<
bool IS_FORWARD>
389 .LogicalAddress =
reinterpret_cast<std::byte*
>(
Record->Address()),
392 .bNoMemoryValidation =
Record->NoMemoryValidation(),
401 if (Record ==
Block->LastRecord)
417 if (Record ==
Block->FirstRecord)
468 FBlock*
Block =
nullptr;
469 std::byte*
Data =
nullptr;
470 FRecord*
Record =
nullptr;
476 Iterator
begin()
const
478 return (NumEntries > 0) ? Iterator(HeadBlock) : Iterator{};
484 Iterator
end()
const {
return Iterator{}; }
491 FBlock*
Block = HeadBlock->NextBlock;
492 while (
nullptr !=
Block)
533 template <
size_t SIZE>
553 size_t NumEntries = 0;
554 size_t TotalSizeBytes = 0;
constexpr T AlignDown(T Val, uint64 Alignment)
Definition AlignmentTemplates.h:34
#define UE_AUTORTFM_FORCEINLINE
Definition AutoRTFMDefines.h:171
#define LIKELY(x)
Definition CityHash.cpp:107
UE_FORCEINLINE_HINT FLinearColor operator*(float Scalar, const FLinearColor &Color)
Definition Color.h:473
#define CA_SUPPRESS(WarningNumber)
Definition CoreMiscDefines.h:125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_FORCEINLINE_HINT bool operator!=(const FIndexedPointer &Other) const
Definition LockFreeList.h:76
TIndexedContainerIterator< TArray< FPreviewAttachedObjectPair >, FPreviewAttachedObjectPair, int32 > TIterator
Definition PreviewAssetAttachComponent.h:68
uint32 Size
Definition VulkanMemory.cpp:4034
memcpy(InputBufferBase, BinkBlocksData, BinkBlocksSize)
GeometryCollection::Facades::FMuscleActivationData Data
Definition MuscleActivationConstraints.h:15
@ Bits
Definition PacketView.h:34
FORCEINLINE FStridedReferenceIterator begin(FStridedReferenceView View)
Definition FastReferenceCollector.h:490
FORCEINLINE FStridedReferenceIterator end(FStridedReferenceView View)
Definition FastReferenceCollector.h:491
ULANG_FORCEINLINE constexpr T AlignUp(T Val, uint64_t Alignment)
Definition Storage.h:93
U16 Index
Definition radfft.cpp:71