Skip to content

Commit

Permalink
Fixed a bug that caused a Memory Limit Exceeded error when trying to …
Browse files Browse the repository at this point in the history
…allocate more than MEMORY_LIMIT_MARGIN/2 when there was no memory limit
  • Loading branch information
mikimasn committed Feb 7, 2024
1 parent 0f457bb commit 65c5a25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/limits/MemoryLimitListener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ tracer::TraceAction MemoryLimitListener::handleMemoryAllocation(
", ",
VAR(memoryPeakKb_));

if (memoryUsage > memoryLimitKb_) {
if (memoryLimitKb_ > 0 && memoryUsage > memoryLimitKb_) {
outputBuilder_->setKillReason(
printer::OutputBuilder::KillReason::MLE,
"memory limit exceeded");
Expand Down

0 comments on commit 65c5a25

Please sign in to comment.