Android :: How Much Is Too Much Memory Allocation In NDK?

Jun 14, 2010

The NDK download page notes that, "Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on."I came from a C background and was excited to try to use the NDK to operate most of my OpenGL ES functions and any native functions related to physics, animation of vertices, etc... I'm finding that I'm relying quite a bit on Native code and wondering if I may be making some mistakes. I've had no trouble with testing at this point, but I'm curious if I may run into problems in the future.

For example, I have game struct defined (somewhat like is seen in the San-Angeles example). I'm loading vertex information for objects dynamically (just what is needed for an active game area) so there's quite a bit of memory allocation happening for vertices, normals, texture coordinates, indices and texture graphic data... just to name the essentials. I'm quite careful about freeing what is allocated between game areas.Would I be safer setting some caps on array sizes or should I charge bravely forward as I'm going now?

Android :: How much is too much memory allocation in NDK?


Android :: Dalvik Memory Allocation / How To Change Default Limits?

Jun 20, 2010

I am currently considering to develop an application for processing of images captured by the camera of mobile phones using the Android OS. Before I make the decision to go forth, I have done some research and found out there are some complaints regarding the limits of the memory allocated by the Dalvik VM, which seem to be limiting to applications that require manipulation and processing of images. Which limits should i have in mind if i would have to process for example 3 photos taken with the camera, in my process, applying filters, transforms and other types of mathematical operations?I would like to know if it is possible to change the default value of
memory allocated by the Dalvik VM for each application (this default is of 16 MB), in any way, using the Android 1.6 OS. Has anybody looked into this that can help me out please? I have also read in the Android 2.1 compatibility definition document
(available here: http://static.googleusercontent.com/external_content/untrusted_dlcp/source.android.com/pt-PT//compatibility/android-2.1-cdd.pdf )that it is possible to change the allocation of memory by the Dalvik VM from 16 MB to 24 MB or even a bigger amount if it is necessary, but t is not mentioned anywhere how this can be done. If someone has looked into those issues before.

View 1 Replies View Related

Android :: Where Is DDMS Allocation Tracker?

Nov 13, 2009

I can't find the DDms allocation tracker in the DDMS perspective in eclipse. I search the view doing Window > show view I look to the android view but i have no allocation tracker view there. I use search view tool and I can't find any Where is this View ? (If it's obvious, i am sorry because i reallu can't find it)

View 4 Replies View Related

Android :: Using Allocation Tracker In DDMS

Oct 4, 2010

I have an Activity that is running out of memory in CreateSurface. The logcat looks like this: 10-04 17:55:52. 574 : ERROR/SurfaceFlinger(1086): createSurface() failed, generateId = -12 10-04 17:55:52.574: WARN/ Window Manager (1086): OutOfResourcesException creating surface 10-04 17:55:52.574: INFO/WindowManager (1086): Out of memory for surface! Looking for leaks. 10-04 17:55:52.574: WARN/WindowManager (1086): No leaked surfaces; killing applicatons! 10-04 17:55:52.574: WARN/ActivityManager (1086): Killing processes Free memory at adjustment 0 I'm trying to use DDMS to figure out what's going on but when the application gets killed DDMS aborts the Allocation Tracker. Is there a way to cause the application to do a core dump and is there a tool for analyzing dumps? I have SDK version 8, which does not allow simultaneous use of DDMS and the Eclipse debugger so I need to get creative.

View 5 Replies View Related

Android :: Camera Preview Application - Buffer Allocation?

Nov 21, 2009

I have some questions regarding the code below for camera preview application.

1. How does surfaceCreated() and CreateSurface() relate? Is this surface created via createSurface() from SurfaceFlinger client to SurfaceFlinger server? If so, there must be 2 buffers (frame buffers from display driver if there is how acceleration or if it is the emulator, it will be from ashmem) associated with this surface: surface BB (for composition) and surface FB (for display).

2. How does the rendering buffer (frame buffer BB and frame buffer FB) get allocated in the camera preview application? Are they allocated by the application?

3. How does this surface relate to the preview buffers? Are the preview buffers allocated by the Camera Service during startPreview?

private class CameraSurfaceView extends SurfaceView implements SurfaceHolder.Callback {
private SurfaceHolder mHolder; private Camera camera = null;
public CameraSurfaceView(Context context) { super(context);
mHolder = getHolder(); mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
} public void surfaceCreated(SurfaceHolder holder) {
camera = Camera.open(); try {
camera.setPreviewDisplay(mHolder);
} catch (Exception e) { Log.e("Camera", "Failed to set camera preview display", e);
} } }

View 2 Replies View Related

Android :: Avoiding String Allocation In TextView.setText()

Dec 28, 2009

On Android 1.5, using the Allocation Tracker I see that every time I call TextView.setText() with a StringBuilder as first argument, a String gets allocated from the following call stack (first line is last call):

java.lang.AbstractStringBuilder toString java.lang.StringBuilder toString android.text.TextUtils stringOrSpannedString android.widget.TextView setText

I tried specifying the buffer type with setText(strBuilder, TextView.BufferType.NORMAL) but it doesn't change anything.

Is there a way to avoid this allocation?

View 2 Replies View Related

HTC Desire :: Allocation Of Sounds To Functions

Sep 13, 2010

Hope someone can help, is it possible to allocate a ring tone to a particular function? I wish to have install a mp3 'tune' I have to be used when a text message is delivered.

View 1 Replies View Related

General :: Adjusting Storage Allocation (SD / USB /Apps)

Dec 14, 2011

Problem discovered while installing Navfree. Got the error message "not enough space". I cant move it to the SD card or anything as I can't install it even.

I have 25Gb of available space but less than 2Gb for apps? I'd like to use all internal storage for apps and the external card for media. How I set that up?

I have a Galaxy S2 Epic (SPH-D710) stock ROM, rooted with the zermax kernel and fited with a Sandisk 16Gb class 4 micro sd card.

Settings>Applications>Manage applications>All
112Mb used of 1.9Gb available.

Settings>Storage>USB storage
Total space is 11.5Gb and Available space 11.5Gb

Settings>Storage>SD card
Total space 14.83Gb (aka 16Gb!) and Available space 14.81Gb.

View 1 Replies View Related

Android :: Installer Intent To Install On Memory Card Or On Phone Memory

Dec 2, 2009

How to tell the installer intent to install on memory card or on phone memory ?

View 2 Replies View Related

Android :: Out Of Memory / Orientation Change / Memory Analyzer Question

Jan 21, 2010

My application is designed to support both portrait and landscape orientations. Using my HTC IO device, it survives 12 orientation changes before throwing an out of memory exception while inflating my activity.When I follow the recommended procedure of using DDMS to first force a GC and then write a heap dump, and then load it into the Eclipse Memory Analyzer, there is only one retained instance of my application, as there should be. None of the other retained objects are obvious offenders. Just for yuks, I reran the test, and did everything the same way except I didn't force a GC. In this case I see 13 instances of my application, which is more consistent with throwing an OOM exception. Is this telling me something useful? If forcing a GC with DDMS reclaims the memory used by now-defunct instances of my activity, I would have thought the VM would have garbage collected some, if not all of these defunct activities automatically. Do I need to request GC at the very beginning of my activity lifecycle to make sure?

View 7 Replies View Related

Sony Ericsson Xperia X10 :: How Do I Transfer Photos From Phone Memory To My Memory Card

Jul 10, 2010

iv got a x10i how do i transfer photos from phone memory to my memory card as i can't find an option do do this.

View 1 Replies View Related

HTC Droid Eris : Low Memory - When Open App Manager It Shows Mail App Is Using 59mb Of Memory

Jun 24, 2010

My phone is low on memory, when I open my app manager it shows my mail app is using 59mb of memory. I have erased all mail and cleared the cache with no change. I am running android 2.1

View 3 Replies View Related

HTC Desire :: MiniSD Card Showing 200MB Memory Instead 4GB Memory

Jun 25, 2010

I have a 4GB SD card and it thinks that it has a total of 200MB on there (Its empty). I have tried formatting it using my Mac & via the phone itself but it continues to believe that its a 200MB MiniSD card.

View 1 Replies View Related

HTC Wildfire :: Can Install Apps Onto Memory Card Rather Then Phones Memory

Sep 18, 2010

Is there anyway I can install apps onto the memory card rather then the phones memory as I keep getting the 'memory low' message on my phone esp when I install games/apps that are around 15mb in size.

View 1 Replies View Related

HTC Desire : Memory - Switch To Sd Card When Phone Memory Full

Sep 9, 2010

Not had my desire long but down loaded a few apps for it they all seem to be stored on phone memory not the sd card. what is stored to the sd card seems to be unused so far. do you have to set it up to use sd card or does it know one is fitted. does it switch to sd card when phone memory full. will run out of space soon if can't get things to store to card instead of phone mem.

View 5 Replies View Related

HTC Incredible :: Saving To Internal Memory Instead Of Phone Memory?

Aug 19, 2010

Every time I download a app it installs in phone memory and not internal memory.Where is the settings for this? I am switching over from windows mobile phone to my new incredible

View 1 Replies View Related

HTC Desire : Get Apps To Memory Card Instead Of Phone Memory?

Sep 16, 2010

I need help to get my apps to the memory card instead of phone memory, how do I do that?

View 2 Replies View Related

General :: Way To Use Memory From SD Card For Phones Internal Memory

Apr 7, 2013

I'm wanting to learn more about android. Is there a way to use memory from the sd card for the phones internal memory? Is there an app that will tell me whats useing up so much memory? I'm on the ZTE warp sequent ,rooted.

View 1 Replies View Related

Android :: Android - Memory Analyzing - Eclipse Memory Analyzer?

Jun 24, 2010

I need to check my application for memory leaks, i also need to see the memory allocation of my application.I downloaded and installed eclipse memory analyzer, and it looks like the first step is to open a heap dump.But what is a heap dump, how can i create a heap dump.And how exactly am i going to use this software, I did some googling but i couldn't find any useful information

View 3 Replies View Related

HTC Legend :: Phone Memory And External Memory

Apr 27, 2010

how can you tell where an app is being downloaded to? is everything set to download to the sd card?if not what is set to download to the phone memory? i'm guessing phone back ups and settings?

View 3 Replies View Related

HTC Incredible :: Low Memory Warning But Plenty Of Memory Available

Jun 7, 2010

Here's the proof of the madness. I deleted several space hogging applications and it hasn't gone away. I have also power cycled and messed around with a few settings and the low storage warning will not go away.

View 49 Replies View Related

Android :: How To Keep Program Not Using Out Of Memory?

Sep 22, 2010

I used advance task killer and check frequently to see which programs are running in the background, frequently there are a number of programs I never use running in the background. How do I keep these programs from loading?

View 5 Replies View Related

Android :: Get Memory And CPU Usage?

Jun 25, 2010

Is there any API by which we can get CPU or Memory usage of android? I have tried one code as below: Please look into it and let me know if this is the correct way?

package com.infostretch.mainactivity;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;..............

View 1 Replies View Related

Android :: See Usage Of Memory?

Jun 30, 2010

1 I want to see the usage of memory in the android through the procrank command,but throw a error error: creating kernel interface. Why/ 2 if use the top command, but the info of the %MEM is not correct. Because all the pid's info's sum will >100% ,so Why?

View 3 Replies View Related

Android :: Out Of Memory Exception

Sep 2, 2010

I have a problem with a strange out of memory exception that only occurs on some devices (mostly HTC Desire). It happens there every time a user starts a certain activity (no matter how - there are two paths to that activity) and i'm really puzzled as to why (i checked for leaks and couldn't find any)...

The error is either thrown when calling setContentView or shortly after.

This is the code block that throws the error:

CODE:.........

As i said - the error is usually thrown when calling setContentView or when calling getMonthTimeStamps()

getMonthTimeStamps is a helper function which creates a list of dates available in the internal database. It creates a couple of (small objects) and returns an ArrayList.

Here is the function:

CODE:.............

I'm not claiming that my code is flawless or perfect, but i really don't understand why this error is thrown. The XML-layout doesn't contain any references to images and not very complicated (textview, spinner, tablelayout).

Here is the error log i received from one user:

CODE:.....................

View 4 Replies View Related

Android :: Traceview Out Of Memory

Jun 15, 2009

I have been trying to use traceview for profiling my Android app. So far I have gotten it to work on very small parts of the program. If I use it for bigger chunks it creates too much information (.trace file is too large) and I get an OutOfMemory (heap memory) error from the java compiler. I tried some tricks with setting higher min and max heap memory values but no luck. If anyone has used traceview with similar effects before. I would highly appreciate any tips you may have. Here are the details. First I am reproducing the error message: $ traceview.bat tmp.trace Exception in thread "main" java.lang.OutOfMemoryError:.....

View 3 Replies View Related

Android :: Running Out Of Memory

Feb 2, 2009

I am running a script that runs randomly the browser and music.After 7-8 instances of browser getting opened I see the following error :-

CODE:........

Is it possible to open the browser windows consecutively for 10 mins.Secondly why does the background process get killed?

View 2 Replies View Related

Android :: ListActivity Out Of Memory

Sep 8, 2009

I am using a ListActivity. Each list entry contains an ImageView and a TextView. I have a huge list and has been getting Out of Memory errors once I scroll through a fair amount of them. I figured I need to reduce the size of the images but I am wondering what happens to the objects once the list entry is hidden from view (as i scroll down the list). I have read somewhere that the list entry objects are automatically re-use. But what happens to the drawable images which were loaded into the ImageView? IF the ImageView object is reused, what happens to the binary image? Are they freed automatically? How do I prevent the OutOfMemory exception? I want to do something similar like the Android Market. As one scroll downwards the images are loaded and new entries are loaded. The Markey can have a long list which one can scroll down and all the way back up again without any problem. The only difference being mine throws OutOfMemory Exception. Advice anyone?

View 2 Replies View Related

Android :: App That Needs To Use Non-memory SD Card

Feb 2, 2010

I'm contemplating making an android version of my iPhone app. One of the attractions is the availability of a micro/miniSD card from Spectec that has an Ant+ radio in it, to communicate with Ant+ protocol devices.

The technical feasibility of this is not my question; but rather its practicality:

This obviously involves taking out the SD memory card in the handset and replacing it with one with no on-board memory, leaving the device with only the builtin 256mb or whatever. this is plenty for my app, but I'm concerned that, aside from annoying the user by having all their music removed, there will be apps on the users device that save data to the SD and will be broken by removing the SD memory.

View 1 Replies View Related

Android :: Googlemap Out Of Memory

May 17, 2010

I made an android application with googlemap api, and draw some 16x16 png (about 200 count) on overlay. When I move or zoom on/in mapview, "out of memory" error occurs very often.

I also used the googlemap appication in my htc itself. Seams that it uses about 14+MB memmory, and never happens "out of memory".

How to save memmory usage in a googlemap api, or how to enlarge android api memmory limit.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved