MemoryManagerクラスには、アプリケーションの現在の使用量と制限を取得するためのいくつかの静的プロパティがあります。
// Gets the app's current memory usage.
MemoryManager.AppMemoryUsage
// Gets the app's memory usage level.
MemoryManager.AppMemoryUsageLevel
// Gets the app's memory usage limit.
MemoryManager.AppMemoryUsageLimit
あなたは、あなたのメモリ割り当てを管理するための最善の方法を決定するために、アプリケーションのメモリ制限を使用することができますMemoryManager.AppMemoryUsageLimitChanging
イベント
private void OnAppMemoryUsageLimitChanging(
object sender, AppMemoryUsageLimitChangingEventArgs e)
{
Debug.WriteLine(String.Format("AppMemoryUsageLimitChanging: old={0} MB, new={1} MB",
(double)e.OldLimit/1024/1024,
(double)e.NewLimit/1024/1024));
}
を使用して変更することの限界に反応することができます。
デバイスに搭載されているRAMの合計を取得するにはどうすればよいですか? – hellodear