Skip to content

Commit

Permalink
Merge pull request #1303 from ThatOpen/Test
Browse files Browse the repository at this point in the history
Allow no chunking
  • Loading branch information
beachtom authored Mar 1, 2025
2 parents 895e319 + e99a16f commit 7584591
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/cpp/web-ifc/parsing/IfcLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ namespace webifc::parsing {

IfcLoader::IfcLoader(uint32_t tapeSize, uint64_t memoryLimit,uint32_t lineWriterBuffer, const schema::IfcSchemaManager &schemaManager) :_lineWriterBuffer(lineWriterBuffer), _schemaManager(schemaManager)
{
_tokenStream = new IfcTokenStream(tapeSize,memoryLimit/tapeSize);
uint64_t maxChunks;
if (memoryLimit > 0) maxChunks = memoryLimit/tapeSize;
else maxChunks = 0;
_tokenStream = new IfcTokenStream(tapeSize,maxChunks);
_maxExpressId=0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/cpp/web-ifc/parsing/IfcTokenStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ namespace webifc::parsing

void IfcTokenStream::checkMemory()
{
if (_activeChunks == _maxChunks){
if (_maxChunks != 0 && _activeChunks == _maxChunks){
for (uint32_t x = 0; x < _chunks.size(); x++)
{
if (_chunks[x].IsLoaded())
Expand Down

0 comments on commit 7584591

Please sign in to comment.