{"id":22013740,"url":"https://github.com/KwaiAppTeam/KOOM","last_synced_at":"2025-07-23T08:32:59.104Z","repository":{"id":37629776,"uuid":"285517634","full_name":"KwaiAppTeam/KOOM","owner":"KwaiAppTeam","description":"KOOM is an OOM killer on mobile platform by Kwai.","archived":false,"fork":false,"pushed_at":"2024-04-16T09:24:36.000Z","size":31052,"stargazers_count":3206,"open_issues_count":66,"forks_count":427,"subscribers_count":69,"default_branch":"master","last_synced_at":"2024-11-28T11:04:11.672Z","etag":null,"topics":["android","crash","heap-analysis","heap-dump","java","java-heap","mobile","oom","perf","performance"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KwaiAppTeam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-06T08:34:04.000Z","updated_at":"2024-11-28T05:12:15.000Z","dependencies_parsed_at":"2024-04-16T10:03:36.420Z","dependency_job_id":null,"html_url":"https://github.com/KwaiAppTeam/KOOM","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KwaiAppTeam%2FKOOM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KwaiAppTeam%2FKOOM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KwaiAppTeam%2FKOOM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KwaiAppTeam%2FKOOM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KwaiAppTeam","download_url":"https://codeload.github.com/KwaiAppTeam/KOOM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227262285,"owners_count":17755228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","crash","heap-analysis","heap-dump","java","java-heap","mobile","oom","perf","performance"],"created_at":"2024-11-30T03:24:36.069Z","updated_at":"2024-11-30T03:24:39.099Z","avatar_url":"https://github.com/KwaiAppTeam.png","language":"C++","funding_links":[],"categories":["APM 开源项目"],"sub_categories":["APM相关开源组件/系统"],"readme":"[![license](https://img.shields.io/badge/license-Apache--2.0-brightgreen.svg)](https://github.com/KwaiAppTeam/KOOM/blob/master/LICENSE)\n[![Platform](https://img.shields.io/badge/Platform-Android-brightgreen.svg)](https://github.com/KwaiAppTeam/KOOM/wiki/home)\n# KOOM\nAn OOM killer on mobile platform by Kwai. \n\n中文版本请参看[这里](README.zh-CN.md)\n\n## Introduction\n\nKOOM creates a mobile high performance online memory monitoring solution，which supplies a detailed report when OOM related problems are detected, and has solved a large number of OOM issues in the Kwai application. It's currently available on **Android**.\n\nWith the increasing complexity of mobile terminal business logic and the gradual popularity of scenarios with high memory requirements such as 4K codec and AR magic watch, the OOM problem has become the number one problem in the stability management of the Kuaishou client. \nIn the daily version iteration process, OOM surges occasionally occur, and the online environment is very complicated. There are thousands of AB experiments. Pre-prevention and post-recovery cannot be achieved. Therefore, high-performance online memory monitoring solutions are urgently needed.\n\nSo how should OOM governance be built? At present, KOOM has the capability of monitoring leakage of Java Heap/Native Heap/Thread, and will build multi-dimensional and multi-business scenarios monitoring in the future.\n\n## Features\n\n### Java Leak Monitor\n- The `koom-java-leak` module is used for Java Heap leak monitoring: it uses the Copy-on-write \nmechanism to fork the child process dump Java Heap, which solves the problem.\nThe app freezes for a long time during the dump. For details, please refer to [here](./koom-java-leak/README.md)\n### Native Leak Monitor\n- The `koom-native-leak` module is a Native Heap leak monitoring solution: use the [Tracing garbage collection](https://en.wikipedia.org/wiki/Tracing_garbage_collection) mechanism to analyze the entire Native Heap, and directly output the leaked memory information like: size/Allocating stacks/etc.; \n  greatly reduces the cost of analyzing and solving memory leaks for business students. For details, please refer to [here](./koom-native-leak/README.md)\n### Thread Leak Monitor\n- The `koom-thread-leak` module is used for Thread leak monitoring: it hooks the life cycle \n  function of the thread, and periodically reports the leaked thread information. For details, please refer to [here](./koom-thread-leak/README.md)\n\n## STL Support\nAll Native modules support two access modes, c++_shared and c++_static. For details, please \nrefer to [cpp-support](https://developer.android.com/ndk/guides/cpp-support).\n- Add dependency to the project build.gradle (take koom-java-leak as an example)：\n```groovy\ndependencies {\n  // In shared mode, multiple modules share the same libc++_shared.so (STL), and the package \n  // size is small, but when multiple modules depend on different STL versions, the final \n  // compilation will conflict. For example, you might get \"dlopen failed: cannot locate symbol\n  // \"__emutls_get_address\" referenced by\" errors.\n  implementation \"com.kuaishou.koom:koom-java-leak:${latest_version}\"\n  // Or in static mode, each module has its own STL, the package size is large, and there are no \n  // compilation and runtime problems.\n  implementation \"com.kuaishou.koom:koom-java-leak-static:${latest_version}\"\n  // If you depend on multiple modules, the shared and static modes cannot be mixed. \n  // The following way is wrong, remember!\n  implementation \"com.kuaishou.koom:koom-java-leak-static:${latest_version}\"\n  implementation \"com.kuaishou.koom:koom-monitor-base:${latest_version}\"\n}\n```\n- Introduce a way to resolve the conflict of shared mode, add `pickFirst` in the project root \n  directory build.gradle：\n```groovy\npackagingOptions {\n  // Select the first libc++_shared.so when packaging apk, it may encounter unpredictable bugs \n  // at runtime, use it with caution!\n  pickFirst 'lib/*/libc++_shared.so'\n}\n```\n\n## minSdk\n- The minSdk of all modules is 18. If the minSdk of your app is lower than that, it needs to be \n  compatible with overrideLibrary in the manifest.\n```xml\n  \u003cuses-sdk tools:overrideLibrary=\"com.kwai.koom.fastdump, com.kwai.android.base, com.kwai.koom.base\" /\u003e\n```\n\n## License\nKOOM is under the Apache license 2.0. For details check out the [LICENSE](./LICENSE).\n\n## Change Log\nCheck out the [CHANGELOG.md](./CHANGELOG.md) for details of change history.\n\n## Contributing\nIf you are interested in contributing, check out the [CONTRIBUTING.md](./CONTRIBUTING.md)\n\n## Feedback\nWelcome report [issues](https://github.com/KwaiAppTeam/KOOM/issues) or contact us in WeChat group.\n\n\u003cimg src=./doc/images/wechat.jpg/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKwaiAppTeam%2FKOOM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKwaiAppTeam%2FKOOM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKwaiAppTeam%2FKOOM/lists"}