Why does MemoryUsageLimit decrease when background process is launched?
According to this, we use ApplicationMemoryUsageLimit to get the maximum
amount of memory that your application process can allocate. As note in
Caution section
The value returned by this property can vary depending on the type of
process that called the property, and the current amount of available
memory on the device. For example, the amount of memory that a background
agent process can allocate could be different than the amount that a
foreground application process can allocate
Using ApplicationMemoryUsageLimit in the UI code, I see 150MB. But after I
launch VoIP process (by calling VoipBackgroundProcess.Launch), I see
100MB.
The coincidence is that when I log ApplicationMemoryUsageLimit in
VoipForegroundLifetimeAgent code, I see 50MB, exactly the amount of memory
that has been decreased.
Why is that ?
No comments:
Post a Comment