2012-06-22 5 views
2

Galaxy Tab 10.1에서 약 12MB의 힙을 차지하는 응용 프로그램을 개발 중입니다.Android 힙 크기가 16MB보다 작습니다.

그러나이 응용 프로그램을 내 Samsung Vibrant에서 테스트 할 때 3MB를 약간 넘고 사용 된 힙 크기의 비율은 약 98 %입니다.

누군가가 왜 이렇게 설명 하는지를 설명하고 해결 방법을 찾는 데 도움이 될 수 있습니까?

VMRuntime은 더 이상 사용되지 않으며 최소 힙 크기를 늘릴 수있는 대안을 찾지 못했습니다.

감사합니다.

답변

0

모든 Android 기기는 응용 프로그램의 힙 크기가 다릅니다.

/** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     setContentView(R.layout.main); 

     mHeapText = (TextView)findViewById(R.id.mHeapText); 

     ActivityManager mActivityManager = (ActivityManager)getApplicationContext().getSystemService(ACTIVITY_SERVICE); 
     int activityMemory = mActivityManager.getMemoryClass(); 
     mHeapText.setText("This Device Able to Use for App " + String.valueOf(activityMemory) + "MB"); 
    } 

삼성 활기찬 힙 크기를 확인하십시오.

+0

최소 16MB입니다. Vibrant에는 48MB가 있습니다. – SeveN

관련 문제