diff options
author | Jamie Liu <jamieliu@google.com> | 2020-09-14 11:19:08 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-14 11:34:50 -0700 |
commit | 2969b17405d248acbb8a0839fc57ff0a44ec1977 (patch) | |
tree | 0db13e8bc5e140910b2645be1012a53b7c03ed8e /tools/go_generics | |
parent | 833ceb0f14485ee11719b52a42087dfac14de856 (diff) |
Correct FDSize in /proc/[pid]/status.
In Linux, FDSize is fs/proc/array.c:task_state() => struct fdtable::max_fds,
which is set to the underlying array's length in fs/file.c:alloc_fdtable().
Follow-up changes:
- Remove FDTable.GetRefs() and FDTable.GetRefsVFS2(), which are unused.
- Reset FDTable.used to 0 during restore, since the subsequent calls to
FDTable.setAll() increment it again, causing its value to be doubled. (After
this CL, FDTable.used is only used to avoid reallocation in FDTable.GetFDs(),
so this fix is not very visible.)
PiperOrigin-RevId: 331588190
Diffstat (limited to 'tools/go_generics')
0 files changed, 0 insertions, 0 deletions