Skip to content

Many OutOfMemory reports happen with plenty of memory #2399

@eric

Description

@eric

Platform

tvOS

Installed

CocoaPods

Version

7.31.1

Steps to Reproduce

  1. Wait for an OutOfMemory alert
  2. Observe the breadcrums that report memory usage

Expected Result

I expect that OutOfMemory alerts are only for OutOfMemory issues.

Actual Result

We report used and available memory for all breadcrumb entries:

  extras[@"memory.used"] = [NSString stringWithFormat:@"%0.1fMB", LTCurrentMemoryUsed() / 1024.0 / 1024.0];
  long memoryFree = LTCurrentMemoryFree();
  if (memoryFree > 0) {
    extras[@"memory.free"] = [NSString stringWithFormat:@"%0.1fMB", memoryFree / 1024.0 / 1024.0];
  }

and when I look at recent OutOfMemory crashes, I see results like this:

{
memory.free: 1865.9MB, 
memory.used: 232.1MB
}

or

{
memory.free: 2069.9MB, 
memory.used: 28.1MB
}

right before the exception.

It is possible that I have some run-away memory leak that happens right at that moment, but it seems suspicious that the free memory is so high.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions