diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-10-29 14:50:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-29 14:50:15 -0400 |
| commit | 066bc37f34ab4f72edef2b71fab50b45c3bb627e (patch) | |
| tree | 6880c04996a7c2b964983d6a006e77a55a75fcde /source/core/slang-memory-arena.h | |
| parent | c27b7d91aaf6bc764807a8998a9c885e57c22a1b (diff) | |
Feature/riff improvements (#1099)
* Added RiffReadHelper
* Move type to fourCC in Chunk simplifies some code.
* Make MemoryArena able to track external blocks.
Allow ownership of Data to vary.
Changed IR serialization to use moved allocations to avoid copies.
As it turns out all of the array writes could use unowned data, but doing so requires the IRData to stay in scope longer than IRSerialData, which it does at the moment - but perhaps needs better naming or a control for the feature.
Diffstat (limited to 'source/core/slang-memory-arena.h')
| -rw-r--r-- | source/core/slang-memory-arena.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/core/slang-memory-arena.h b/source/core/slang-memory-arena.h index 75744710f..d346197f0 100644 --- a/source/core/slang-memory-arena.h +++ b/source/core/slang-memory-arena.h @@ -138,6 +138,9 @@ public: /// Rewind (and effectively deallocate) all allocations *after* the cursor void rewindToCursor(const void* cursor); + /// Add a block such that it will be freed when everything else is freed. + void addExternalBlock(void* data, size_t size); + /// Default Ctor MemoryArena(); /// Construct with block size and alignment. Block alignment must be a power of 2. |
