+3
−34
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
When we open cgroup.procs, we'll allocate an buffer and store all tasks' tgid in it, and then duplicate entries will be stripped. If that results in a much smaller pid list, we'll re-allocate a smaller buffer. But we've already sucessfully allocated memory and reading the procs file is a short period and the memory will be freed very soon, so why bother to re-allocate memory. Signed-off-by:Li Zefan <lizefan@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>