Skip to content

Commit 65c5a25

Browse files
committed
Fixed a bug that caused a Memory Limit Exceeded error when trying to allocate more than MEMORY_LIMIT_MARGIN/2 when there was no memory limit
1 parent 0f457bb commit 65c5a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/limits/MemoryLimitListener.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ tracer::TraceAction MemoryLimitListener::handleMemoryAllocation(
8888
", ",
8989
VAR(memoryPeakKb_));
9090

91-
if (memoryUsage > memoryLimitKb_) {
91+
if (memoryLimitKb_ > 0 && memoryUsage > memoryLimitKb_) {
9292
outputBuilder_->setKillReason(
9393
printer::OutputBuilder::KillReason::MLE,
9494
"memory limit exceeded");

0 commit comments

Comments
 (0)