Will the Android service work in another process, contribute to the same heap limit?

[Note. This is a question about starting an Android service in a separate process: How can an Android application have multiple processes?

If I specify a service to run in a separate process, will it have its own heap limit (or does it share the heap limit with that of the main process)? In short, are there heap restrictions for each process or for each application?

+6
source share
1 answer

Each process has its own virtual memory and address space. Thus, each process also has its own heap, which it controls itself.

However, all processes have the same physical memory controlled by the OS. Thus, a separate process can sometimes help with memory problems, but not always.

+5
source

Source: https://habr.com/ru/post/894015/


All Articles