Skip to content

Commit

Permalink
SmoothedBufferValue: add assertions for working with arena allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Dec 24, 2023
1 parent e14121c commit 9b071d6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ template <typename FloatType, typename ValueSmoothingTypes>
void SmoothedBufferValue<FloatType, ValueSmoothingTypes>::process (int numSamples, ArenaAllocator& alloc)
{
bufferData = alloc.allocate<FloatType> (numSamples, bufferAlignment);
jassert (bufferData != nullptr); // arena allocator is out of memory!
process (numSamples);
}

Expand Down Expand Up @@ -116,6 +117,7 @@ template <typename FloatType, typename ValueSmoothingTypes>
void SmoothedBufferValue<FloatType, ValueSmoothingTypes>::process (FloatType value, int numSamples, ArenaAllocator& alloc)
{
bufferData = alloc.allocate<FloatType> (numSamples, bufferAlignment);
jassert (bufferData != nullptr); // arena allocator is out of memory!
process (value, numSamples);
}

Expand Down

0 comments on commit 9b071d6

Please sign in to comment.