ActivityManager.SetWatchHeapLimit(Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Request that the system start watching for the calling process to exceed a pss size as given here.
[Android.Runtime.Register("setWatchHeapLimit", "(J)V", "GetSetWatchHeapLimit_JHandler", ApiSince=23)]
public virtual void SetWatchHeapLimit (long pssSize);
[<Android.Runtime.Register("setWatchHeapLimit", "(J)V", "GetSetWatchHeapLimit_JHandler", ApiSince=23)>]
abstract member SetWatchHeapLimit : int64 -> unit
override this.SetWatchHeapLimit : int64 -> unit
Parameters
- pssSize
- Int64
The size in bytes to set the limit at.
- Attributes
Remarks
Request that the system start watching for the calling process to exceed a pss size as given here. Once called, the system will look for any occasions where it sees the associated process with a larger pss size and, when this happens, automatically pull a heap dump from it and allow the user to share the data. Note that this request continues running even if the process is killed and restarted. To remove the watch, use #clearWatchHeapLimit()
.
This API only works if the calling process has been marked as ApplicationInfo#FLAG_DEBUGGABLE
or this is running on a debuggable (userdebug or eng) build.
Callers can optionally implement #ACTION_REPORT_HEAP_LIMIT
to directly handle heap limit reports themselves.
Java documentation for android.app.ActivityManager.setWatchHeapLimit(long)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.