/// @brief Returns a pointer to byteSize bytes of heap memory that persists
/// for the lifetime of the allocator (or until FreeAll is called).
inlinevoid*Allocate(size_tbyteSize);
/// @brief Releases all the memory owned by this allocator.
// Memory provided through function Allocate is not valid anymore after this function has been called.
inlinevoidFreeAll();
private:
constexprconststaticsize_tg_maxBytesPerBlock=64*1024*1024;// The maximum size (in bytes) of a block
constexprconststaticsize_tg_startBytesPerBlock=16*1024;// Size of the first block. Next blocks will double in size until maximum size of g_maxBytesPerBlock
size_tm_blockAllocationSize=g_startBytesPerBlock;// Block size of the current block
size_tm_subIndex=g_maxBytesPerBlock;// The current byte offset in the current block
std::vector<uint8_t*>m_storageBlocks;// A list of blocks
};
}// namespace Assimp
/// @brief Fixes an undefined reference error when linking in certain build environments.
// May throw warnings about needing stdc++17, but should compile without issues on modern compilers.