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

  • Home
  • SEARCH
  • 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 6970333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:41:48+00:00 2026-05-27T16:41:48+00:00

I have made a demo activity. i.e a simple Activity with a layout and

  • 0

I have made a demo activity. i.e a simple Activity with a layout and a TextView.

I have used

Log.e(kFileString, "Native Heap Allocated Size = "
    + Debug.getNativeHeapAllocatedSize());
Log.e(kFileString, "Native Heap Free Size = "
    + Debug.getNativeHeapFreeSize());
Log.e(kFileString, "Native Heap SIZE = " + Debug.getNativeHeapSize());

for logging the native heap assigned.

I noticed that each time I change the orientation the allocated native heap is increased.

Can someone please tell me why this happens and if there is any documentation about the Android native heap management?

  • 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-05-27T16:41:49+00:00Added an answer on May 27, 2026 at 4:41 pm

    I just ran a sample application and changed the orientation a couple of times with your log lines added in my onCreate().

    It kept allocation more and more Heap memory but once the Garbage Collector ran I was back to almost the same Heap size I started from.

    Here is the log output:

    12-22 15:35:04.403: D/ISA(15592): Native Heap Allocated Size = 5720352
    12-22 15:35:04.423: D/ISA(15592): Native Heap Free Size = 9952
    12-22 15:35:04.433: D/ISA(15592): Native Heap SIZE = 5730304
    12-22 15:35:15.764: D/ISA(15592): Native Heap Allocated Size = 5802312
    12-22 15:35:15.764: D/ISA(15592): Native Heap Free Size = 9912
    12-22 15:35:15.774: D/ISA(15592): Native Heap SIZE = 5812224
    12-22 15:35:19.558: D/ISA(15592): Native Heap Allocated Size = 5821688
    12-22 15:35:19.568: D/ISA(15592): Native Heap Free Size = 11016
    12-22 15:35:19.568: D/ISA(15592): Native Heap SIZE = 5832704
    12-22 15:35:22.941: D/ISA(15592): Native Heap Allocated Size = 5841120
    12-22 15:35:22.941: D/ISA(15592): Native Heap Free Size = 12064
    12-22 15:35:22.951: D/ISA(15592): Native Heap SIZE = 5853184
    12-22 15:35:25.243: D/ISA(15592): Native Heap Allocated Size = 5860416
    12-22 15:35:25.243: D/ISA(15592): Native Heap Free Size = 9152
    12-22 15:35:25.243: D/ISA(15592): Native Heap SIZE = 5869568
    12-22 15:35:28.316: D/ISA(15592): Native Heap Allocated Size = 5879752
    12-22 15:35:28.316: D/ISA(15592): Native Heap Free Size = 10296
    12-22 15:35:28.316: D/ISA(15592): Native Heap SIZE = 5890048
    12-22 15:35:30.568: D/ISA(15592): Native Heap Allocated Size = 5899064
    12-22 15:35:30.568: D/ISA(15592): Native Heap Free Size = 11464
    12-22 15:35:30.568: D/ISA(15592): Native Heap SIZE = 5910528
    12-22 15:35:32.300: D/ISA(15592): Native Heap Allocated Size = 5918416
    12-22 15:35:32.300: D/ISA(15592): Native Heap Free Size = 12592
    12-22 15:35:32.300: D/ISA(15592): Native Heap SIZE = 5931008
    12-22 15:35:34.262: D/ISA(15592): Native Heap Allocated Size = 5937696
    12-22 15:35:34.272: D/ISA(15592): Native Heap Free Size = 9696
    12-22 15:35:34.282: D/ISA(15592): Native Heap SIZE = 5947392
    12-22 15:35:36.194: D/ISA(15592): Native Heap Allocated Size = 5956976
    12-22 15:35:36.204: D/ISA(15592): Native Heap Free Size = 10896
    12-22 15:35:36.204: D/ISA(15592): Native Heap SIZE = 5967872
    12-22 15:35:37.455: D/ISA(15592): Native Heap Allocated Size = 5976216
    12-22 15:35:37.455: D/ISA(15592): Native Heap Free Size = 12136
    12-22 15:35:37.455: D/ISA(15592): Native Heap SIZE = 5988352
    12-22 15:35:39.387: D/ISA(15592): Native Heap Allocated Size = 5995496
    12-22 15:35:39.387: D/ISA(15592): Native Heap Free Size = 13336
    12-22 15:35:39.387: D/ISA(15592): Native Heap SIZE = 6008832
    12-22 15:35:41.129: D/ISA(15592): Native Heap Allocated Size = 6018880
    12-22 15:35:41.139: D/dalvikvm(1606): GC_CONCURRENT freed 1769K, 51% free 4277K/8583K, external 4127K/5154K, paused 18ms+14ms
    12-22 15:35:41.139: D/ISA(15592): Native Heap Free Size = 14528
    12-22 15:35:41.139: D/ISA(15592): Native Heap SIZE = 6033408
    12-22 15:35:47.055: D/ISA(15592): Native Heap Allocated Size = 5829472
    12-22 15:35:47.065: D/ISA(15592): Native Heap Free Size = 199840
    12-22 15:35:47.065: D/ISA(15592): Native Heap SIZE = 6033408
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've made a simple grabbing demo page . It doesn't have any easing/acceleration. I
I have made the smallest demo project to illustrate my problem. You can download
What Windows Phone 7 demo/reference applications have you seen which really made you interested
I have made a short demo of a javascript problem. When the Submit button
I have made a demo small program that I want to deliver to my
I have made a simple image slideshow using jQuery. I need the next button
The demo page: CLICK HERE I have made a picture to show: As clearly
I have made a SVG image, or more like mini application, for viewing graphs
I have made some code which exports some details of a journal article to
I have made a custom UserControl i Vb.net (windows application). How can I add

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.