Skip to content

Commit

Permalink
Enable MemoryPressureHandler for MALLOC_HEAP_BREAKDOWN
Browse files Browse the repository at this point in the history
Enabling MALLOC_HEAP_BREAKDOWN currently disables MemoryPressureHandler.
We would like to keep both enabled to be able to track
memory related issues.
  • Loading branch information
asurdej-comcast authored and pgorszkowski-igalia committed May 2, 2024
1 parent 903aacc commit ac6b407
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/WTF/wtf/MemoryPressureHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ void MemoryPressureHandler::setMemoryFootprintPollIntervalForTesting(Seconds pol

void MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor(bool use)
{
#if !ENABLE(MALLOC_HEAP_BREAKDOWN)
if (!isFastMallocEnabled()) {
// If we're running with FastMalloc disabled, some kind of testing or debugging is probably happening.
// Let's be nice and not enable the memory kill mechanism.
return;
}
#endif

if (use) {
m_measurementTimer = makeUnique<RunLoop::Timer>(RunLoop::main(), this, &MemoryPressureHandler::measurementTimerFired);
Expand Down

0 comments on commit ac6b407

Please sign in to comment.