top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Android VM and Influence on memory in Native side

+2 votes
170 views

I wishito know if android's Garbage Collection mechanism affects memory held in the native side ( especially the memory held by android.graphics.Canvas objects ).
Occassionally, I see crashes in libskia.so immediately following a GC operation on the same process that crashed. I 'm unaware of the VM's GC operation but am interested to know how native memory is affected by GC.

posted Oct 16, 2013 by Naveena Garg

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I find that the emulator's memory increase rapidly when check GPU on. You can do the reproduction as following:
1. Turn on GPU following http://developer.android.com/tools/devices/emulator.html#acceleration
2. Power on the emulator
3. Launch some apps by mouse, (i,e. launch Settings then Clock, and Settings then Clock ...)
4. Check the memory usage of emulator by top command on Ubuntu and ProcessExplorer on Windows

I found that the apps with property android:hardwareAccelerated="true" is more worse.

0 votes

Can anyone suggest the library for Push Notification?

0 votes

Update is installed but status is in pending on App Center. Since sync is alreday called , it won't rollback automatically and also not updating to newer version. The app crashes on startup everytime.

So how to rollback or update to new code push bundle version in this case ?

Here is the sample code:

componentDidMount() { 
codePush.sync(codePushOptions,(status) => {  
switch (status) {    
case codePush.SyncStatus.CHECKING_FOR_UPDATE:
//console.log("Checking for updates.");
break;  
case codePush.SyncStatus.DOWNLOADING_PACKAGE:
//console.log("Downloading package.");
break;   
case codePush.SyncStatus.INSTALLING_UPDATE:
//console.log("Installing update.");
break;  
case codePush.SyncStatus.UP_TO_DATE:
break;  
case codePush.SyncStatus.UPDATE_INSTALLED:         
break;
}
})
throw new Error();
}

Note : I have thrown error to check working of auto rollback.

+3 votes

I've been trying to figure out how an android app is installed by browsing AOSP.

The PackageManagerService.java has the gids for the corresponding permissions by parsing the platform.xml file.

PackageInstallerActivity parses and checks for any existing packages and then invokes the InstallAppProgress

I was able to follow the paths where the package is parsed and validated and PackagerManager.installPackage() method is invoked to install the package. I know this makes a native call to the JNI library. The corresponding aidl file is IPackageManager.aidl.

What I want to know is where can I find the Native cpp code related to this aidl mentioned above?

...