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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:40:31+00:00 2026-06-08T02:40:31+00:00

In my project, i have a simple activity composed of a single XML layout

  • 0

In my project, i have a simple activity composed of a single XML layout (enabled by setContentView). The project has other activities though.

The layout is basically composed of two .jpg images. The first one has 25kB and is 400×153 px. The second one has 4kB and is 150×50 px.

Despite this very simple context, the DDMS tells me i have 13MB allocated to my program, which i think is huge, given i only have two small images loaded, and that some device have a maximum heap size of 16MB for each program.

Is it normal for the heap to be so big in this layout?

EDIT: HProf Dump:

Problem Suspect 1:
The class “android.content.res.Resources”, loaded by “”, occupies 9,429,232 (70.39%) bytes. The memory is accumulated in one instance of “java.lang.Object[]” loaded by “”.

Problem Suspect 2:
3 instances of “android.graphics.Bitmap”, loaded by “” occupy 2,147,960 (16.03%) bytes.

Biggest instances:
•android.graphics.Bitmap @ 0x41407b98 - 1,048,648 (7.83%) bytes. 
•android.graphics.Bitmap @ 0x4169e6a0 - 979,256 (7.31%) bytes. 

I can’t really interpret this. But it seems like my other resources are being loaded before-hand? (before I enter their respective activities?)

  • 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-08T02:40:33+00:00Added an answer on June 8, 2026 at 2:40 am

    If you say that that’s all your program is trying to do, then it’s normal. Bitmaps do take up a lot of memory. Try to optimize your images, and that should definitely help you in reducing the memory footprint of your apps. Think about 9-patch images while creating backgrounds.

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

Sidebar

Related Questions

I have a simple PoC project in Hudson. The PoC has unit tests written
I write simple project in android. I have ~10 activities, and the user flipping
I have a retain/release project that has a simple algorithm. I start out w/
I'd like to try out the D programming language. I have simple pet project
I have a simple Scala project that runs without any problems inside Eclipse, however,
I have this simple test project just to test the IncludeExceptionDetailInFaults behavior. public class
In my simple project I have 2 views - a line item view (Brand)
I have a simple java project (adapted from the example here ), which is
I have a simple asp.net MVC4 / EF 4.1 project created with VS 2011,
Currently I have a simple maven project that is building a jar file and

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.