ANDROID: af_unix: Allocate memory for the largest possible size of 'struct scm_fp_list'
In order to work around some fairly intrusive ABI infringements, we have
2 choices. Either create a whole new structure to wrap around 'struct
scm_fp_list' or push all of the new field entries to the bottom of the
existing struct.
Initially we opted for the first choice, since this seemed to save a
substantial amount of memory (~500KB) due to the kmemdup() magic found
in scm_fp_dup(). However, this required some far reaching adaptions to
the current code, meaning that the chances of conflicts in the future
would have been significant and maintenance costs would have remained
high.
However, it turns out that each block of 2KB that is allocated in
scm_fp_dup() is not accumulative and only exists for a short amount of
time before being subsequently freed. Thus, the hit taken with respect
to the extra memory used by simply allocating the largest possible size
of the struct is now considered to be a good trade-off. So let's do
that.
Bug: 404256079
Signed-off-by:
Lee Jones <joneslee@google.com>
Change-Id: Id8fc8dd01deae75d87dce16f46a59ff67cac0832
Loading
-
mentioned in commit 85ccd008
-
mentioned in commit 7050f121
-
mentioned in commit fdd901d1
-
mentioned in commit 1b6ae23d
-
mentioned in commit b14bd18b
-
mentioned in commit 49c46977
-
mentioned in commit 13bfae6f
-
mentioned in commit 3043acf2
-
mentioned in commit 2c0300e7
-
mentioned in commit 636f3f70
-
mentioned in commit 37e169a3
Please sign in to comment