title: Out of (native?) memory crashes on Android React Native, low reported memory usage
body: <p>I'm failing to find concrete information on troubleshooting Out of memory exceptions for RN apps running on Android. I've been getting some OOM errors reported to my Bugsnag dashboard, all of which seem fishy.</p>
  
  <ul>
  <li>The crashes are occurring on the login screen, before any heavy logic / rendering / etc. occurs. </li>
  <li>The reported memory usage is low (one crash occurred with 3MB used by the app). This may not include anything used in the NDK though after emailing Bugsnag.</li>
  <li>Available memory is far beyond used memory (though not including what is used by the NDK)</li>
  </ul>
  
  <p>This is not isolated to older devices - one crash occured on a Galaxy S9 with the app using 13MB (plus NDK), and 255MB still available.</p>
  
  <p>I of course enabled largeHeap for the time being while I investigate, but I'm still seeing crashes with this low reported memory usage. The only direction I have is checking if RN is eating up native memory, which isn't reported as 'used memory' in my console.</p>
  
  <p>While profiling my app (using a debug variant APK, not against the development server), I do see the native memory usage seems high - 81mb with the app just sitting for a while after logging in. It hovers around 30-40mb prior to logging in. </p>
  
  <p><a href="https://i.stack.imgur.com/XjxmQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XjxmQ.png" alt="enter image description here"></a></p>
  
  <p>I've ensured my code isn't making any API calls or loading resources during the crash workflow. The login is fairly simple, consisting of a gradient, some text and views, and react-native-app-auth being loaded to handle a login. I do not see a spike when performing the authentication in that library.</p>
  
  <p>Are there any tools or methods to check why RN is eating so much native space? Or is this just normal? I'm currently on RN 0.57.5, React 16.6.3. I cannot test on iOs devices to check if this is an Android-specific problem.</p>