Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8696313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:14:56+00:00 2026-06-13T01:14:56+00:00

I’m facing some troubles with memory consumption while developing 2D game using libGDX. It’s

  • 0

I’m facing some troubles with memory consumption while developing 2D game using libGDX.

It’s a 2D game with rich graphic content – there are many textures, animations, fonts etc.
For some reasons all graphic content is loaded on game start – and here is a problem with memory. I’ve tested memory allocation (native & heap) on different devices and got different results:
(I’ve divided all devices for groups by textures sizes)

Group 1 (textures adopted for ~840*480 screens)

HTC Desire (Froyo):
178Mb(native) – 12Mb(heap) – application loads successfully

HTC One V (ICS):
30Mb(native) – 12Mb(heap) – application loads successfully

HTC Desire S (Jelly Bean):
30Mb(native) – 12Mb(heap) – application loads successfully

Group 2 (textures adopted for ~1366*768 screens)

Samsung(Google) Galaxy Nexus
329Mb(native) – 18Mb(heap) – works perfectly

Galaxy TAB (Honeycomb)
164Mb(native) – 10Mb(heap) – application crashes (Surface.OutOfResouresException).

I think there could be some significant memory management difference on all android versions, which brings me these troubles.

Can anyone explain what exactly happens while loading textures on android 3.x? Or maybe post some links to understand what need to be done to resolve this problem.

SOME UPDATE

Toady I’d made some additional tests on 3.x emulators (I know this is not best way, but logs was similar on emu and Galaxy Tab before)

  1. I’ve run game with textures adopted for 1024*600 – app crashes on 80% loading resources (158 native memory allocation)
  2. With textures for 800*480 – app crashes on 100% loading (145Mb native memory allocation)

And finally I have run app on new Google Nexus tablet (Jelly Bean) which uses same textures as 3.x tablets (1280*800px) – ~30Mb native memory and ~12Mb vm heap.

Now I completely lose understanding of what’s going on – same memory allocation for textures 800*480 and 1280*800…

FINALLY

I have been resolve this situation using load resources on demand with some progress bar. After all attemptions I have no found another way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:14:57+00:00Added an answer on June 13, 2026 at 1:14 am

    If your wondering why Android 3 is crashing more than 2.X, it’s because of a ByteBuffer bug.
    ByteBuffer use 4 times the memory. So you have to use lower res images for Android 3. This was solved in Android 4.

    http://code.google.com/p/android/issues/detail?id=16941

    Lucky for Android 3+ you have the large heap option (gives about 128+ megs) which is what I had to turn on for our app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.