Loading libprocessgroup/include/processgroup/processgroup.h +6 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ bool SetProcessProfiles(uid_t uid, pid_t pid, const std::vector<std::string>& pr static constexpr const char* CGROUPS_RC_PATH = "/dev/cgroup_info/cgroup.rc"; // Path to test against for freezer support // TODO: remove and replace with a function call, see http://b/180056337 // TODO: remove it once https://r.android.com/1607196 is properly merged to all branches, // see http://b/180056337 static constexpr const char* CGROUP_FREEZE_PATH = "/sys/fs/cgroup/uid_0/cgroup.freeze"; bool UsePerAppMemcg(); Loading Loading @@ -68,6 +69,10 @@ bool setProcessGroupLimit(uid_t uid, int initialPid, int64_t limitInBytes); void removeAllProcessGroups(void); // Provides the path for an attribute in a specific process group // Returns false in case of error, true in case of success bool getAttributePathForTask(const std::string& attr_name, int tid, std::string* path); #endif // __ANDROID_VNDK__ __END_DECLS libprocessgroup/processgroup.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -508,3 +508,7 @@ bool setProcessGroupSoftLimit(uid_t, int pid, int64_t soft_limit_in_bytes) { bool setProcessGroupLimit(uid_t, int pid, int64_t limit_in_bytes) { return SetProcessGroupValue(pid, "MemLimit", limit_in_bytes); } bool getAttributePathForTask(const std::string& attr_name, int tid, std::string* path) { return CgroupGetAttributePathForTask(attr_name, tid, path); } libprocessgroup/profiles/cgroups.json +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ "Controllers": [ { "Controller": "freezer", "Path": "freezer", "Path": ".", "Mode": "0755", "UID": "system", "GID": "system" Loading Loading
libprocessgroup/include/processgroup/processgroup.h +6 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ bool SetProcessProfiles(uid_t uid, pid_t pid, const std::vector<std::string>& pr static constexpr const char* CGROUPS_RC_PATH = "/dev/cgroup_info/cgroup.rc"; // Path to test against for freezer support // TODO: remove and replace with a function call, see http://b/180056337 // TODO: remove it once https://r.android.com/1607196 is properly merged to all branches, // see http://b/180056337 static constexpr const char* CGROUP_FREEZE_PATH = "/sys/fs/cgroup/uid_0/cgroup.freeze"; bool UsePerAppMemcg(); Loading Loading @@ -68,6 +69,10 @@ bool setProcessGroupLimit(uid_t uid, int initialPid, int64_t limitInBytes); void removeAllProcessGroups(void); // Provides the path for an attribute in a specific process group // Returns false in case of error, true in case of success bool getAttributePathForTask(const std::string& attr_name, int tid, std::string* path); #endif // __ANDROID_VNDK__ __END_DECLS
libprocessgroup/processgroup.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -508,3 +508,7 @@ bool setProcessGroupSoftLimit(uid_t, int pid, int64_t soft_limit_in_bytes) { bool setProcessGroupLimit(uid_t, int pid, int64_t limit_in_bytes) { return SetProcessGroupValue(pid, "MemLimit", limit_in_bytes); } bool getAttributePathForTask(const std::string& attr_name, int tid, std::string* path) { return CgroupGetAttributePathForTask(attr_name, tid, path); }
libprocessgroup/profiles/cgroups.json +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ "Controllers": [ { "Controller": "freezer", "Path": "freezer", "Path": ".", "Mode": "0755", "UID": "system", "GID": "system" Loading