Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Galf · Sep 24, 2015 at 06:18 PM · androidmemory managementmemory-leakprofiling

What exactly triggers Out of Memory for android?

Hi there,

My game is currently crashing on android devices, reporting:

W/Adreno-GSL(17972): <gsl_ldd_control:393>: ioctl fd 60 code 0xc01c0934 (IOCTL_KGSL_GPUMEM_ALLOC_ID) failed: errno 12 Out of memory

Clearly, I'm taking up too much space somewhere, but I'd like to know what boundary I'm running into before starting to reduce allocations. When I pull up the device's (Galaxy S3) /System/build.prop file, it mentions heap growth limit of 96 MB, and a heapsize limit of 256 MB. However, when I use the Unity profiler, the total memory reported appears to stay around ~100 MB. If I grab the actual memory usage on android (dumpsys meminfo), it looks like it's taking up ~330 MB of private memory, with a heap size of 162 MB, both of which I didn't think should be possible.

Can anyone give me some better information on what exactly is evaluated to determine I'm out of memory?

Thanks!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jessespike · Sep 24, 2015 at 08:09 PM 0
Share

I could be wrong, but from what I've seen: You'll know when the game runs of out memory when the device tries to allocate memory at an invalid address, thus throwing a SIGSEGV11 error or similar. Which probably isn't too helpful, but it's a hint. You can run the Unity profiler while running the game on a device to give you better insight on how the memory is being managed. You can also open the editor.log and see if there are any files that are unnecessarily or suspiciously large.

avatar image Galf Jessespike · Sep 24, 2015 at 09:47 PM 0
Share

I'm not actually seeing a sigfault -- just the error I listed above. Given that error message, I figured it must be a GPU issue, so I created an empty project that just allowed me to constantly create textures and upload them to the GPU. When that sample finally crashed, it gave the same error. It seemed to be tied solely to Texture memory -- I could keep readable/writable versions of the textures in memory or not (doubling the memory size), but it made no difference on where the crash occurred.

However, I'm most interested in why, after the crash happens, it was considered a crash. The profiler can tell me how much memory is allocated, but it can't tell me why that specific amount yielded a crash.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Received Memory Warning then crash iOS but I release resources? 1 Answer

Calling a java method in android from Unity 1 Answer

my game android build is consuming vey large amount of memory? 1 Answer

Unity editor memory leak 0 Answers

Memory leak but only in the executable 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges