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 9215867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:17:53+00:00 2026-06-18T02:17:53+00:00

Out-of-memory when loading 3D OBJ model of 5M size. debug shows the dalvik has

  • 0

Out-of-memory when loading 3D OBJ model of 5M size. debug shows the dalvik has 50M memory limit, either on emulator or device. I don’t see why this.

mIndicesInt = ByteBuffer.allocateDirect(indices.length * INT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asIntBuffer();
mIndicesInt.put(indices).position(0);

I even increased AVD RAM to 2048M and heap to 1024M, it doesnot help. it always stop with the same numbers:

D/setIndices(2270): Memory: Pss=67.88 MB, Private=66.09 MB, Shared=13.30 MB
D/setIndices(2270): maxMem=50331648
D/setIndices(2270): totalMem=50208736
D/setIndices(2270): freeMem=1963736

The OBJ model contains more than 20 objects. I removed several objects then out-of-memory issue disappears, so this is a memory hard limit issue per process?

Any suggestion on handling it?
Also AVD optioins to increase RAM and heap size has no effect, why?

  • 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-18T02:17:54+00:00Added an answer on June 18, 2026 at 2:17 am

    5M of vertex data is quite a lot for a mobile environment. If you are also loading textures, consider loading only compressed textures. You can also free some resources once they have been moved to the GPU driver. I would prepare your vertex data offline and only load the required data during runtime. Another option is to compute part of the data, or expand it directly at the vertex/fragment shaders (for example generate bitangents at GPU side).

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

Sidebar

Related Questions

One of my VB 6.0 application throws an error Out of memory when loading
i got out of memory exception upon loading image from file.. i retrieve the
Possible Duplicate: Android: Strange out of memory issue while loading an image to a
Getting Out of memory error while loading large string from the server. This is
I want to see how g++ lays out memory for classes and virtual tables.
I am getting Out of memory exception when assigning values in session variables. The
I got an out of memory exception in a photo editor thingy i was
JBoss crashed with out of memory error, how do I prevent this? I modified
I keep getting a out of memory error in LuaJit. How do I increase
I keep getting an out of memory failure when I try to do the

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.