Skip to content

Commit

Permalink
Fix alloc/free mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-milovidov committed Jun 16, 2024
1 parent f39b166 commit 50f3e0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/aws/crt/StlAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ namespace Aws
return static_cast<RawPointer>(aws_mem_acquire(m_allocator, n * sizeof(T)));
}

#if _LIBCPP_STD_VER > 20
std::allocation_result<T*> allocate_at_least(size_type n)
{
return {allocate(n), n};
}
#endif

void deallocate(RawPointer p, size_type)
{
AWS_ASSERT(m_allocator);
Expand Down

0 comments on commit 50f3e0d

Please sign in to comment.