Skip to content

Commit

Permalink
Last phase of OOM refactoring.
Browse files Browse the repository at this point in the history
- Replaced BSGOutOfMemoryWatchdog with BugsnagSystemState.
- Moved OOM detection into BugsnagClient, which uses BugsnagSystemState as its information source.
- Stronger and more explicit OOM heuristics.
- OOM detection now relies entirely upon last launch state (includng debugger status).

Under the new system, you can cause an out of memory shutdown while the app is not being debugged, and then launch it in a debugger to observe it sending an OOM event. Any sudden shutdowns while a debugger is active won't generate an OOM event (as before).

We should still add more heuristics later. All heuristics are contained and explained in a single easy-to-follow method "didLikelyOOM" in BugsnagClient.
  • Loading branch information
kstenerud committed Sep 24, 2020
1 parent fbf9408 commit 915c02d
Show file tree
Hide file tree
Showing 18 changed files with 615 additions and 607 deletions.
54 changes: 26 additions & 28 deletions Bugsnag.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions Bugsnag/BSGOutOfMemoryWatchdog.h

This file was deleted.

353 changes: 0 additions & 353 deletions Bugsnag/BSGOutOfMemoryWatchdog.m

This file was deleted.

1 change: 1 addition & 0 deletions Bugsnag/Bugsnag.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#import "BugsnagKeys.h"
#import "BugsnagPlugin.h"
#import "BugsnagHandledState.h"
#import "BugsnagSystemState.h"

static BugsnagClient *bsg_g_bugsnag_client = NULL;

Expand Down
Loading

0 comments on commit 915c02d

Please sign in to comment.