3 ms·
This is a good point, in Go all instances of sync.Pool (Go's generic object pool with thread local storage) are registered with the allocator/GC so that under h
by voidlogic 8y ago
This is a good point, in Go all instances of sync.Pool (Go's generic object pool with thread local storage) are registered with the allocator/GC so that under heap pressure they can be drained, it would be great if the OS could request this draining too.
- skyde 8y agoOn android this Is done using LRU cache for background app. If your app has a cached process and it retains memory that it currently does not need, then your app—even while the user is not using it— affects the system's overall performance. As the system runs low on memory, it kills processes in the LRU cache beginning with the process least recently used. The system also accounts for processes that hold onto the most memory and can terminate them to free up RAM.