Growable compressed buffer.
更多...
#include <CompressedGrowableBuffer.h>
|
| void * | Access (int32 Offset) |
| | Accesses the data at passed in offset and returns it. 更多...
|
| |
| int32 | Append (void *Data, int32 Size) |
| | Appends passed in data to the buffer. 更多...
|
| |
| | FCompressedGrowableBuffer (int32 MaxPendingBufferSize, ECompressionFlags CompressionFlags) |
| | Constructor 更多...
|
| |
| SIZE_T | GetAllocatedSize () const |
| | Helper function to return the amount of memory allocated by this buffer 更多...
|
| |
| void | Lock () |
| | Locks the buffer for reading. 更多...
|
| |
| int32 | Num () const |
| |
|
void | Unlock () |
| | Unlocks the buffer and frees temporary resources used for accessing.
|
| |
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::FCompressedGrowableBuffer |
( |
int32 |
MaxPendingBufferSize, |
|
|
ECompressionFlags |
CompressionFlags |
|
) |
| |
|
inline |
Constructor
- 参数
-
| MaxPendingBufferSize | Max chunk size to compress in uncompressed bytes |
| CompressionFlags | Compression flags to compress memory with |
◆ Access()
| void * FCompressedGrowableBuffer::Access |
( |
int32 |
Offset | ) |
|
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 |
◆ Append()
| int32 FCompressedGrowableBuffer::Append |
( |
void * |
Data, |
|
|
int32 |
Size |
|
) |
| |
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. |
- 返回
- Offset of data, used for retrieval later on
◆ GetAllocatedSize()
| SIZE_T FCompressedGrowableBuffer::GetAllocatedSize |
( |
| ) |
const |
|
inline |
Helper function to return the amount of memory allocated by this buffer
- 返回
- number of bytes allocated by this buffer
◆ Lock()
| 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.
◆ Num()
| int32 FCompressedGrowableBuffer::Num |
( |
| ) |
const |
|
inline |
- 返回
- Number of entries appended.
该结构体的文档由以下文件生成:
- CompressedGrowableBuffer.h