![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <CompressedGrowableBuffer.h>
Public Member Functions | |
| CORE_API | FCompressedGrowableBuffer (int32 MaxPendingBufferSize, FName CompressionFormat, ECompressionFlags CompressionFlags=COMPRESS_None) |
| CORE_API void | Lock () |
| CORE_API void | Unlock () |
| CORE_API int32 | Append (void *Data, int32 Size) |
| CORE_API void * | Access (int32 Offset) |
| int32 | Num () const |
| SIZE_T | GetAllocatedSize () const |
Growable compressed buffer. Usage is to append frequently but only request and therefore decompress very infrequently. The prime usage case is the memory profiler keeping track of full call stacks.
| FCompressedGrowableBuffer::FCompressedGrowableBuffer | ( | int32 | MaxPendingBufferSize, |
| FName | CompressionFormat, | ||
| ECompressionFlags | CompressionFlags = COMPRESS_None |
||
| ) |
Constructor
| MaxPendingBufferSize | Max chunk size to compress in uncompressed bytes |
| CompressionFlags | Compression flags to compress memory with |
Accesses the data at passed in offset and returns it. The memory is read-only and memory will be freed in call to unlock. The lifetime of the data is till the next call to Unlock, Append or Access
| Offset | Offset to return corresponding data for |
Appends passed in data to the buffer. The data needs to be less than the max pending buffer size. The code will assert on this assumption.
| Data | Data to append |
| Size | Size of data in bytes. |
Appends passed in data to the buffer. The data needs to be less than the max pending buffer size. The code will assert on this assumption.
| Data | Data to append |
| Size | Size of data in bytes. |
|
inline |
Helper function to return the amount of memory allocated by this buffer
| void FCompressedGrowableBuffer::Lock | ( | ) |
Locks the buffer for reading. Needs to be called before calls to Access and needs to be matched up with Unlock call.
|
inline |
| void FCompressedGrowableBuffer::Unlock | ( | ) |
Unlocks the buffer and frees temporary resources used for accessing.