Files
UnrealEngineUWP/Engine/Source/Runtime/CoreUObject/Private/Serialization
paul chipchase c68d8f8c43 Add support for memory mapped files to BulKData2 which will fix a crash when memory mapped animations have been enabled.
- Attempting to memory map inline data will give a log error(as the original implementation did but will not attempt to actually memory map it as it is very unlikely that inline data would have the correct alignment requirements for the operation to succeed so to keep the code simple we just serialize the inline data which was the existing fallback behaviour anyway.
- Added the memory mapping implementation as it's own method (MemoryMapBulkData) since we only need to support the non-inline case.
- Added a flag (bShouldForceLoad) that when true will force the BulkData2 data to be streamed in immediately. Currently used as a fallback if the memory mapping fails (all callers assume 100% success) but I made it generic enough that we could use it for something else if the use case occurs.
- This is a fairly quick fix to unblock testing, future work includes:
  - Reduce the added memory bloat (adding 2 additional pointers to BulkData2)
  - Implement copy/assignment of memory mapped BulkData (based on the above work)

#jira UE-85974
#rnx
#rb Per.Larsson

[CL 11194361 by paul chipchase in Main branch]
2020-01-31 06:51:54 -05:00
..