Module |
|
Header |
/Engine/Source/Runtime/CoreUObject/Public/Serialization/BulkData2.h |
Include |
#include "Serialization/BulkData2.h" |
class FBulkDataAllocation
This is a wrapper for the BulkData memory allocation so we can use a single pointer to either reference a straight memory allocation or in the case that the BulkData object represents a memory mapped file region, a FOwnedBulkDataPtr. This makes the code more complex but it means that we do not pay any additional memory cost when memory mapping isn't being used at a small cpu cost. However the number of BulkData object usually means that the memory saving is worth it compared to how infrequently the memory accessors are actually called.
We use a flag set in the owning BulkData object to tell us what storage type we are using so all accessors require that a pointer to the parent object be passed in.
Name | Description | ||
---|---|---|---|
|
void * |
AllocateData ( |
Set as a raw buffer. |
|
Free ( |
||
|
void * |
GetAllocationForWrite ( |
Getters. |
|
const void &... |
GetAllocationReadOnly ( |
|
|
IsLoaded() |
Misc. |
|
|
void * |
ReallocateData ( |
|
|
SetData ( |
||
|
SetMemoryMappedData ( |
Set as memory mapped. |
|
|
FOwnedBulkDa... |
StealFileMapping ( |
|
|
Swap ( |